All Questions

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

using “eth_sendRawTransaction” by Go but got invalid argument 0: json: cannot unmarshal non-string into Go value of type hexutil.Bytes

I signed my transaction and my transaction used the standard structure: *types.Transaction here is my transaction: to := common.HexToAddress(toStr) gasPrice_ :=new(big.Int).SetUint64(gasPrice) ...
0
votes
0answers
28 views

Error: Contract not deployed after cloning private geth network from one server to another

Steps to reproduce: Private geth network is running on server1. Deploy contract using truffle and make a few transactions. Stop geth n/w of server1 and copy its entire directory (accounts.txt, boot....
0
votes
1answer
22 views

why does ERC20 Token Balance shows 0 frequently?

I have a DAPP and ERC20 Token which has an initial supply of 9000 for testing purpose..First step is to login/register into the DAPP where all the information resides..There is an element in the DAPP ...
0
votes
0answers
12 views

Transfer ownership of specific mapped array to a different address

I have this contract with a mapped array of the struct Item linked to a specific address. I want to transfer a specific array in Item[] to a different owner/address. What is the best way to achieve ...
1
vote
0answers
16 views

How to set multiple nodes in HttpProvider web3 v1.2.0

I'm working with Nodejs application, and using a multi-node setup on different servers. If I have single node end point like http://localhost:8545 I can use Web3 providers as below var web3 = new Web3(...
0
votes
1answer
31 views

Uniswap Price Feed.- Get price of a Token in a Solidity contract

I am looking to retrieve the current price of a token from Uniswap. I have successfully used the ChainLink oracle api to get the price of BTC/USD, but I want to now integrate Uniswap price feeds. I ...
0
votes
0answers
5 views

Port contract and all token addresses from ETH to OMG [closed]

We're looking to migrate an existing public Ethereum contract where we have hundreds of ERC20 token holders to a new contract on the public OMG network (to mitigate txn fees). What's the best way to ...
1
vote
0answers
41 views

How does Uniswap calculate price impact without fee on the swap page?

Context: We are creating a smart contract which integrates Uniswap DEX for swapping Tokens to ETH. We need to make sure one swap does not impact the token price more than 3%. We are in need to write a ...
0
votes
0answers
22 views

uncaughtException : RangeError: Maximum call stack size exceeded

Facing an issue while working multi-http-provider. When I write var Web3 = require('web3'); require('multi-http-provider'); It throws an error uncaughtException : RangeError: Maximum call stack size ...
0
votes
0answers
27 views

How does a malicious user behave in a private Ethereum blockchain running PoA and Clique? [closed]

The private network is using the PoA consensus algorithm with Clique protocol and gas price and limit are set. If all accounts had large amounts of ether granted to them on creation , how would a ...
0
votes
2answers
44 views

Solidity Split Comma-Delimited String into Individual words

Since Solidity functions can't accept String Arrays as arguments, I'm trying instead to pass in a long comma-delimited string, and then convert it to an array of strings on the fly. I'm close - but ...
0
votes
0answers
14 views

Where does Metamask mobile for Android store private keys?

I currently have a problem with metamask on android mobile. I can no longer access my account, when I enter my password, I have this error: Syntax error: Unexpected token r in JSON at position 0 I ...
0
votes
0answers
20 views

use smart contract as multiple transaction [closed]

I want to know can I use smart contract as a multiple transaction...some ether input from some addresses transfer to some other addresses as outputs I read this article but I did not know https://...
0
votes
0answers
9 views

Metamask mobile app

From our custom mobile app, we would like to allow users to connect to Metamask and fetch their Ethereum account address(after their consent). For this, we need to navigate user from our mobile app to ...
0
votes
0answers
11 views

Error parsing @openzeppelin/upgrades/contracts/upgradeability/ProxyFactory.sol

The @openZeppelin's ProxyFactory.sol("@openzeppelin/upgrades": "^2.8.0",/"truffle": "^5.1.51") is used in development of proxy contract: pragma solidity ^0.7.0; ...
2
votes
2answers
25 views

how is it possible to send 5 successful, consecutive transactions at the same time?

I just witnessed something amazing that I didn't think was possible before. I was under the assumption if that you try to submit consecutive transactions, the latest transaction with the highest nonce ...
0
votes
0answers
12 views

truffle does not find emitted event when it includes a string parameter [closed]

I am finding some weirdness with the Truffle test suite where it recognizes an event if it takes only an address argument, but if it takes an address and a string truffle does not pick it up in the ...
0
votes
0answers
16 views

Solidity - Setting the length of an EnumerableSet UintSet

Is it possible to pre-set the length of the set of an EnumerableSet.UintSet type? For instance, if I declare this mapping: mapping (address => EnumerableSet.UintSet) private agentTickets; and then ...
0
votes
0answers
17 views

How can I have no gas fees in a private PoA network while avoiding spam attacks and the halting problem?

Complete noob here. I'm developing a dApp that functions on top of a private clique PoA blockchain (using geth). The project should be viable in a production environment and allow nodes to transact ...
0
votes
0answers
11 views

NOOB to mining, getting strange results from ethminer

I have just started mining and using ethminer on my mac using the Blackmagic eGPU and I am getting the following output, which doesn't seem correct:- m 18:21:12 Speed 6445.46 Mh/s gpu/0 ...
0
votes
1answer
44 views

Contract with function payable to receive ERC20 token in one shot?

I am trying to write a smart contract with a function that receives an ERC20 token (i.e.: DAI), but the transaction to call this function is always failing. Let's assume I first record the ERC20 ...
0
votes
1answer
27 views

Is it possible to burn an NFT (ERC20 or ERC721) from other provider/creator?

I want to create a wallet/gallery for NFTs and I was wondering if it could be possible for the user to send NFTs made in other providers/minters to burn in my platform. The thing is that I want to ...
1
vote
1answer
38 views

Are newer solidity versions 'safer'? Should I update my existing code to use a newer version?

I have created a set of contracts that will shortly be undergoing an audit. It's a DeFi platform that is intended to hold real value. The project began as a fork of a fairly old project, that uses ...
0
votes
0answers
21 views

How do we register User with Server-side language in Dapp? [closed]

I have an all code defined in my smart contract of user registeration..It's working great,But the issue is, it takes gas fees to register user which is reasonable if you want to write some data on the ...
-2
votes
0answers
31 views

how add value to eth.accounts[0]? [closed]

i created a new account in private chain. But the new account value is zero. How add value to the account? Thank you very much. i install web3.js 0.20.6. geth version: 1.9.23. when i use eth....
1
vote
0answers
11 views

Event emitting from the Interface

When I am calling this code(it's a test code related to the bigger contract, but the same problem can be observed here) I am receiving an error - ParserError - expected ';' but got '.' . pragma ...
0
votes
1answer
19 views

Error while testing a smart contract functionality with Mocha

I wanted to test my code functionality with the Mocha Framework, but every time it responded me with an error, not an assertion. The specific error was: Error:cannot find module "ganache-cli&...
0
votes
1answer
28 views

Web3.py with Ganache - Error “from not found”, 'code': -32000

I have opened an instance of ganache at localhost port 9545 where I can connect with web3.py. However when I am trying to perform a transact using the below code: w3 = Web3(Web3.HTTPProvider('http://...
1
vote
1answer
27 views

Failed mined transactions

Is transaction "status" flagged inside the block when it's mined? Like if a transaction is mined but failed due to out of gas or not meeting contract conditions, is the transaction marked as ...
0
votes
0answers
16 views

sendSignedTransaction: why does it take variable times to return a transaction hash and to reach a mempool?

When we call sendSignedTransaction from web3, my understanding is that the transaction is broadcasted to a provider (either a hosted node or your own node) and added to that node's mempool, assuming ...
0
votes
1answer
33 views

Invalid implicit conversion from uint256 to bytes32 requested

I am trying to run someone else's code from GitHub and I encounter this issue. It said that Invalid implicit conversion from uint256 to bytes32 requested. Please have a look on this code. function ...
1
vote
1answer
19 views

Can I switch my Eth-1 node and Eth-2 node off while waiting for activation?

I setup a Medalla-Geth-Node and a Eth-2 node (Teku) and went through all the steps in the launch pad. My status went from "Deposited" to "Pending" and currently the beaconchain-...
1
vote
0answers
38 views

Calculating annual percentage yield (apy) value for Uniswap pairs

I wants to calculate annual percentage yield for a token pair listed on uniswap like this. Is there any API which I can use to retrieve the value? How can it be directly calculated?
0
votes
0answers
27 views

Uniswap: how is price impact being calculated? [duplicate]

i know that price impact implies that the difference between market price and estimated price due to trade size. say i have a pair: cat token and dog token with pooled cat : 0.999992 pooled dog : 1....
0
votes
0answers
29 views

Getting empty object in web3js

I have a user registeration logic defined in solidity which used to work fine when I set an registeration fees of 0.5 ETH for testing purpose.But now, when I remove the register fees, I'm not able to ...
1
vote
1answer
35 views

Need only sign transaction feature (not send transaction)

I am developing an online store BNB as a payment. Customers will sign transactions using Metamask and then frontend code(js) need to post call to our backend server with the txHash, and then we will ...
0
votes
0answers
13 views

Creating several objects in the same transaction (data repetition)

I'm working with genetic algorithms and I need to create a population. Currently I have this function: /// @notice Create a new individual function createIndiv(uint _popSize) public{ for(uint i = ...
2
votes
0answers
68 views

Geth keep truncating ancient chain + rewind blockchain ? Why ? 😥

Maybe it's a newbe question but I notice that when I restart Geth it always "rewind blockchain" ? Why is this ? Here is example output: INFO [11-08|22:02:47.152] Starting Geth on Ethereum ...
0
votes
0answers
6 views

Issues with autogenerated go file while using abigen

I have a simple sol file message.sol pragma solidity >=0.5.10; contract Message { string public message; constructor(string memory initMessage) public { message = initMessage; ...
0
votes
1answer
25 views

How to approve an transfer with safeERC from OpenZepplelin

My contract does like this; pragma solidity 0.6.2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "...
0
votes
0answers
16 views

How I can transfer ownership from one contract to another contract using truffle console [closed]

If I transfer the ownership of a contract to another contract using following truffle command await token.transferOwnership(someOtherContract1.address); I already did above Now I want to transfer &...
0
votes
0answers
33 views

Uniswap on Ganache

So im trying to write a smart contract that involves using Uniswap. I would like to test my smart contract and was looking into setting up uniswap on my local ganache server, but as I am new, a few ...
0
votes
1answer
22 views

strange revert on proxy pattern delegate call [closed]

I've worked with upgradeable contracts before using zeppelin's upgradeable contract pattern. However, I found out that if I try to fetch the implementation contract address through a contract call, I ...
0
votes
1answer
15 views

can a developer delete balances trough a contract update using openzeppelin

I am new to this and just have some arbitrary questions regarding upgradeable smart contracts. If a Developer would update his contract, could he modify all mappings / variables entirely? Wipe ...
0
votes
0answers
33 views

Approve Allowance ERC(20)

Can you please tell why do we have to approve ERC20 tokens before sending them? contract Transfer { function version1() { ERC20(someToken).transferFrom(msg.sender, address(this), 122); ...
0
votes
1answer
28 views

How to remove this ParserError of contract in solidity langauge. I am using remix ide

pragma experimental ABIEncoderV2; pragma solidity >=0.4.18; contract Record { struct MedRecord { string password; string name; address patient; address[] ...
0
votes
1answer
46 views

Why does Uniswap computes amountOut of a token this way?

It seems[1] they do: (0.997 * amountIn * reserveOut) / (reserveIn + 0.997 * amountIn) From my understanding it should be amountIn * price, which with fee becomes ((1 - fee) * amountIn) * price. Now, ...
0
votes
1answer
19 views

Transaction failed etherscan, coins disappeared?

Okay, I have no idea what just happened, but I think I just lost like 50% of my coins. I sent Link from my ledger to binance, and when I checked an hour later, it said failed both on my ledger app and ...
0
votes
1answer
15 views

Add param to API POST request [closed]

I need to query this endpoint '''https://******com/api/payments/{payment_id}/refund''' Because it is a post request, I assume that the payment_id param needs to be in the body of the request. How do I ...
0
votes
1answer
28 views

what happened exactly when a user read/write data from Ethereum? [closed]

I know a little about Ethereum and how it works, but what am I wondering is that why we exactly need a transaction to be stored in Ethereum blockchain? What's confusing for me is that Ethereum client ...

15 30 50 per page
1
3 4
5
6 7
617