Questions tagged [ethereumjs]

For questions regarding the installation or use of EthereumJS, a Javascript library that implements a number of Ethereum utility functions.

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

My test isn't working and I'm having a lot of issue

const { expect } = require('chai'); const { ethers } = require('hardhat'); const tokens = (n) => { return ethers.parseUnits(n.toString(), 'ether') } describe('Token', ()=> { let token, ...
KriekDev's user avatar
0 votes
0 answers
14 views

Strange order of transactions in the same block

recently i saw next thing: There is a nft game contract, the goal is to be the first (top 100). Each game starts by Tx from admin, let's say he calls start() function in his transaction. Then all ...
0xse's user avatar
  • 1
1 vote
1 answer
10 views

How to ensure only physical Smart Meters can update blockchain data?

Hey fellow blockchain enthusiasts! I'm working on a project where I need to ensure that only physical smart meters can update the data on a blockchain-based Smart Contract. It's crucial to prevent ...
Dagens's user avatar
  • 11
0 votes
0 answers
18 views

Right wat to execute sendSignedTransaction with web3 v4.2.0

I am using [email protected]. I am trying to implement the sendSignedTransaction method, but it keeps on giving me below error. reason: 'err: insufficient funds for gas * price + value: I am sure I do have ...
anish samant's user avatar
0 votes
0 answers
24 views

I keep getting error when trying to send transaction signed by web3.eth.sign with web3.eth.sendsignedtransaction

I get an error Error: TypedTransaction with ID 40 unknown at t.TransactionFactory.fromSerializedData HERE IS MY CODE: const txData = { nonce: "0x" + parseInt(nonce, 10).toString(16), from: ...
Milikoder's user avatar
1 vote
1 answer
33 views

Is there a way that we can mint native coin more in ethereum?

I mean if i have my own private evm chain. the intial supply for it is, assumingly, 10000 coins. after starting the blockchain can I create more coins for that. Like minting and burning works for ...
Hammad Ali's user avatar
0 votes
1 answer
25 views

Deployed a contract using Remix need to access the abi and function whie developing frontend

I have deployed one of my contracts using remix, I have also used the oppenzeplin imports, and while trying to verify I could not cause it could not detect the imports. So I went with making a front ...
kaushik choudhury's user avatar
0 votes
1 answer
33 views

Ethereum Gas fee model

I am trying to understand EIP 1559 Gas fee model. I understand that the transaction fee is calculated as (Block base fee per gas + Max priority fee) * Gas used. So it means that we paid this much to ...
Anuj Kumar's user avatar
0 votes
2 answers
61 views

provide steps to deploy this contract from solidity by example

When i tried deploying this contract using 10 ethers, and then providing : claimPayment() -> amount - 9000000000000000000 i.e 9 ethers -> nonce - 123 -> signature - ...
ImBatman's user avatar
1 vote
1 answer
79 views

How do I hide or mask the sending address when sending tokens or eth

I am trying to build a crypto payment gateway. But when users initiate a withdrawal to credit their customers, the transaction can be tracked up to the point that shows the system address where the ...
Starbody's user avatar
0 votes
1 answer
40 views

are there other ways to send bundle of transactions without using flashbot?

I am wondering if there are some ways to send bundle of transactions without using flashbot? I am not sure how this area works, would you please give me practical sources to learn ?
DHC's user avatar
  • 313
0 votes
1 answer
27 views

Dose contracts must be deployed?

I see js programmers compile and call solidity contract without actually deploying it using hardhat and/or similar tools. Do they really can use the contract without deploying on the chain(like swap ...
Biruk Damte's user avatar
0 votes
1 answer
4 views

Ethereumjs putContractStorage throws an error

I'm experimenting with Ethereumjs and having issues with the putContractStorage from vm.stateManager. The following code snippet: const { VM } = require('@ethereumjs/vm') const vm1 = new VM() const ...
Andreas Tzionis's user avatar
0 votes
0 answers
15 views

Where can the ProviderRpcError type be imported from?

I am creating a WalletConnect function in typescript and React. I want to process when window.ethereum.request returns an error, but I can't directly reference the error as being an unknown type. It ...
ysaito's user avatar
  • 1
1 vote
1 answer
27 views

Call sendSignedTransaction without waiting for result (execute in background)

My Vue.js code with web3.js: function dreamOn() { await web3.eth.sendSignedTransaction(txFin); return; } I want to send this transaction, but I don't want to wait for the result of ...
user125754's user avatar
0 votes
0 answers
37 views

Error when Importing Web3 in React: Module not found for './formats' and

I'm encountering an issue while trying to import the Web3 library in a React project. The error message I'm receiving is: Module not found: Error: Can't resolve './formats' in '/Users/kaustubhsharma/...
kaustubh sharma's user avatar
2 votes
2 answers
431 views

How to decode universal router of uniswap

How can I decode the exacute function going through: "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad" router Etherscan decodes the data as follows: 0 commands bytes 0x0b08 1 inputs ...
Gencehan ARPAÇAY's user avatar
0 votes
0 answers
14 views

Live Price monitor

How does dexscreener or dextools websites keep up with the price changes efficiently on thousands of tokens? Can anyone provide a sample code for that? if not, then a roadmap of steps to be taken, ...
Melardev's user avatar
  • 101
1 vote
0 answers
18 views

i want see level db

I am a beginner studying blockchain in Korea. Recently, I completed 100% synchronization of the goerli testnet using geth as my client. I want to visualize the chaindata/.sst files. Also, I am curious ...
이주희's user avatar
0 votes
1 answer
25 views

why we use ternary operator instead of if else statement

pragma solidity ^0.8.17; // contract AgeVerifier{ // function checkEligibility(uint256 _age) public pure returns (bool) { // if ( _age >=18 ) { // return true; // } else { // return false; // ...
Shan 's user avatar
3 votes
3 answers
255 views

I found a transaction that the maxFeePerGas is equal to maxPriorityFeePerGas on Etherscan

I know the maxFeePerGas = baseFeePerGas + maxPriorityFeePerGas in EIP-1559. But I found this transaction. https://etherscan.io/tx/0xe753607fff85bb9298b90d4dc3357c92d82add1f9a09b48c348fdd7e97a68cd2 I ...
BigSmile's user avatar
0 votes
0 answers
46 views

how to handle eth and wei together in ethers.js

suppose I have the function to send multiple amount's at once from an array but each value is uncertain or unknown: let value = [0,0.87,9.5,0.342,0.66,8] let valueInWei; for(let i =0;i<value.length;...
Anwar's user avatar
  • 51
0 votes
1 answer
12 views

Sign in with Ethereum through a CLI

I have a ts-node backend and I would like to use [Sign In With Ethereum] (https://login.xyz/) to connect user's wallet through a CLI. The user passes his private key as a parameter.
iliev951's user avatar
1 vote
1 answer
368 views

How to access Sepolia from front-end

I have created a contract and want to now connect my front-end using Sepolia. I cannot figure out the right way to connect to the host and start my Dapp. I am using Yarn to run the Dapp. window....
Philip Rutovitz's user avatar
0 votes
0 answers
203 views

Unable to get the Read data or write data using Wagmi sh

So here is the react code and its a simple Counter program. Deployed on the below address. I have put both the solidity part as well as React code // SPDX-License-Identifier: MIT contract ...
kaushik choudhury's user avatar
0 votes
2 answers
56 views

How to Call a Function only on Every New Block Mined

I have deployed a contract on the Mumbai Testnet, and it includes a function called "transfer". I would like to call this function automatically on every new block mined. Essentially, I want ...
Vijay raj panchal's user avatar
0 votes
1 answer
95 views

Uniswap V3 Active Liquidity Provision

I am trying out different strategies for UniSwap active liquidity management. I have been reading different articles on the best strategy and the most popular one seems to be using Bollinger Band. I ...
user122663's user avatar
0 votes
2 answers
831 views

TypeError: Cannot read properties of undefined (reading 'map')

Hello Everyone Here is my next js code actually I try to fetch the event data from smart contract but when I mapping the data this error is occur TypeError: Cannot read properties of undefined (...
Yasir Saeed's user avatar
1 vote
1 answer
122 views

implementing chart like Dextool's chart for my react.js application

I'm gonna implement chart into my react.js application. Chart method should be similar to dextools. Now I try to use GraphQL to retrieve all trading histories. And also I'm gonna use OHLC react chart ...
Kevin Lee's user avatar
  • 128
0 votes
1 answer
58 views

How to query a contract function via Etherscan's API with uint256 input?

I'm trying to query this contract: 0x992678ad242230Dd795107Fee8B572E27083002A and to get the "getglobalStakedTokensPerPeriod" (number 11) with the unit456 of 1 (period 1) I've tried to use ...
Harel Leon's user avatar
1 vote
1 answer
24 views

Smart Contract Testing of Crowd Funding

Hi Iam new in solidity program i don't know how to test the donate function can anybody help me how to test? Actually I want to test when some donate the donater balance is minus and the person who ...
Yasir Saeed's user avatar
3 votes
2 answers
437 views

Where to store IPFS hash other than infura.io without paying

I used infura.io to store IPFS hash few months ago in my Ethereum dapp based on React JS but now it's not free anymore and it is asking for my bank account details. I want to use it for small personal ...
MaheenUnzeelah's user avatar
0 votes
0 answers
33 views

JsonRpcProvider RPC call results wrong while BrowserProvider works well

I'm facing really weird phemomenon.. What Im doing is, Im instantiating Wallet with my private key, and trying to send ERC-20 methods to endpoint ('https://ethereum.publicnode.com') const provider = ...
Jisang Seo's user avatar
0 votes
2 answers
74 views

How to know total value of buying and selling of a wallet via web3

I want to know how much a wallet has bought and sold the assets. I need to know it in dollars. For example, 500$ of assets bought and sold by a wallet Something like this is possible in web3?
Fariha Abbasi's user avatar
0 votes
1 answer
31 views

How to get total assets value in dollars of a wallet via web3?

I want to check the total assets value in dollars of a wallet. For example, I just want to check how much asset (Ethers, erc20 tokens) does a wallet hold in form of dollars? e.g: 2000$ worth of assets ...
Fariha Abbasi's user avatar
2 votes
1 answer
108 views

Stuck at looking for peers when I setup full ethereum node in Ubuntu

I am trying to install a full Ethereum 1.0 node on Ubuntu, but I keep encountering an issue. I have tried synchronizing the local time and turning off the firewall, and my computer resources are more ...
DEFI Expert's user avatar
1 vote
1 answer
257 views

How to test a function that returns array type struct using Foundry

I'm a beginner with Solidity, and I'm working on a smart contract that mints an NFT and stores relevant information inside a struct. The issue I'm currently facing is that when testing the ...
David Jay's user avatar
  • 301
0 votes
0 answers
15 views

Current tick falling outside of position's lower and upper tick

I would like some assistance on this matter: My pool of reference is ETH/USDC and if my current tick is below my position’s lower tick, am I right to state that all of my position ETH will be ...
Porsche Lim's user avatar
0 votes
0 answers
50 views

Calculate amount of ETH and USDC after minting a position in uniswap v3

I would love help in this aspect as I am a novice: Backdrop: UNISWAP V3 ETH/USDC pool Current tick of 202,690 Position upper tick of 203,000 Position lower tick of 202, 000 Position value in USDC of ...
Porsche Lim's user avatar
0 votes
0 answers
15 views

Building an ethereum based identity system

Okay, I am still new to the web3 space, written a couple of smart contracts so far, but i want to take on a mid-sized project on building a decentralized identity management system on Ethereum Network,...
Dhaniel's user avatar
1 vote
0 answers
67 views

How to let client side sign the transaction and send it to blockchain

This mint function is giving me this error Uncaught (in promise) Error: Returned error: transaction could not be decoded: unsupported transaction type And if I use ethereum-js/tx module to serialize ...
kaan.py's user avatar
  • 11
0 votes
2 answers
2k views

We were not able to estimate gas. There might be an error in the contract and this transaction may fail

I cannot add a candidate as it shows there is an error in the contract, but the code does not show any error. **// SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.9.0; contract Election{...
Sheefa Jalali's user avatar
0 votes
0 answers
133 views

Error: cannot override "to" (operation="overrides", overrides=["to"], code=UNSUPPORTED_OPERATION, version=contracts/5.6.2)

I'm facing this error while I'm trying to mint with sending transaction const tx = { from: accounts[0], to: ContractAddress, value:...
Kashif Sattar's user avatar
1 vote
1 answer
311 views

ReferenceError: providers is not defined [Getting the following error when i am trying to use Ether.js to get block number]

var url = 'https://mainnet.infura.io/v3/<my-api-key>'; var customHttpProvider = new ethers.providers.JsonRpcProvider(url); async function displayblock() { var block = await providers....
Pratik Jussal's user avatar
0 votes
0 answers
75 views

Is it possible to use flashloan as liquidity provider?

I am reading about flash loans where I come over a use case of flash loan as providing liquidity to DEXs. I am bit confused here. How we can earn profits by just providing liquidity to DEXs since we ...
Rishabh Raghwendra's user avatar
0 votes
0 answers
18 views

Error during calling testCallfoo function using .call() keyword

// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; contract Receiver { event Received(address caller, uint amount, string message); fallback() external payable { emit Received(...
Dheeraj Kumar's user avatar
1 vote
0 answers
19 views

TypeError: Cannot read property ':kyc' of undefined

node init.js /home/root/init.js:16 abiDefinition = JSON.parse(contract.contracts[':kyc'].interface); ^ TypeError: Cannot read property ':kyc' of ...
Nevin Michael's user avatar
2 votes
0 answers
70 views

Can’t remove liquidity on uniswap [closed]

I’m having issue removing my lp from uniswap 0xbeF4fB0BE483c74667aB6Fb5f3C1fCdc7b4eC073 Please help check the contract out
dwanloaded tv's user avatar
0 votes
0 answers
66 views

ethereumjs dump state like geth evm

I'm trying to get a state dump in ethereumjs library after running some EVM op codes just like it's in geth's EVM: dev@dev-desktop:~$ geth.evm --dump --code 00 run { "root": "...
Zizi's user avatar
  • 1
0 votes
2 answers
194 views

Is profitable direct arbitrage impossible with getAmountsOut?

I’ve run the math on a uniswap v2 arbitrage trade that looks more or less like this: 1) Buy X amount of token1 with Y amount of token0 on Uniswap 2) Sell equivalent amount of token1 in exchange for ...
Trent Kennelly's user avatar

1
2 3 4 5
16