Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 vote
0 answers
17 views

How to get uniswap v3 price tick?

I am planning to get the price range from users (lower price and higher price ) but if the user provide lower price as 0.00029991932 and higher price is 0.00033985099 then how can I get the lower tick ...
unni krishnan's user avatar
0 votes
0 answers
22 views

How come a memecoin like `PEPE` become popular with a very simple source code [closed]

I am reading some memecoin smart contract source code from etherscan. One of them is PEPE as an example, its source code is very simple, just a little extension from ERC20, below is the source code I ...
Joey Yi Zhao's user avatar
0 votes
0 answers
10 views

Mint new position not working for all existing pairs

I am using uniswap v3 mintNewPosition to mint new liquidity position .So i called mintNewPosition() function mentioned in https://docs.uniswap.org/contracts/v3/guides/providing-liquidity/mint-a-...
unni krishnan's user avatar
0 votes
3 answers
35 views

How do I know what method is called when swap to my ecr20 token?

I am reading ECR20 code: https://docs.openzeppelin.com/contracts/2.x/api/token/erc20 and understand how it works. What I don't know is that what the method is called when swap other tokens to my ECR20 ...
Joey Yi Zhao's user avatar
1 vote
1 answer
33 views

How to make a simple connection from web3 to an HTML site and payment using BNB?

I want to make a simple payment via BNB on my HTML website. The amount is fixed. With the help of which libraries can I connect via WalletConnect and pay from any BNB wallet? Without using server type ...
Madis Conner's user avatar
0 votes
1 answer
13 views

How to copy this transaction, change the parmeters and send again?

I need to copy this transaction: https://etherscan.io/tx/0x9acf0ecfd6f5a320a419ad8b155208d25f666e228b955d6df7109c84f46f7425 After that, change the recipient address and the NFT ID and send again. I ...
Udbdjfj's user avatar
0 votes
0 answers
20 views

Ethereum instance not intiialized - call Ethereum.factory first

I am using @metamask/sdk-react in a react project. Below is the code: import { MetaMaskProvider } from '@metamask/sdk-react'; <MetaMaskProvider debug={true} sdkOptions={{ ...
Joey Yi Zhao's user avatar
0 votes
0 answers
27 views

Why does transaction value have impact on transaction fee in Ethereum?

I am sending a transaction to Sepolia test network from browsers. The code I have is something like: provider.request({ method: 'eth_sendTransaction', params: [ { ...
Joey Yi Zhao's user avatar
0 votes
0 answers
45 views

Why is the transaction fee very high?

I am sending transaction to Sepolia testnet from browser. The code I have is: await provider.request({ method: 'eth_sendTransaction', params: [ { from: account....
Joey Yi Zhao's user avatar
1 vote
0 answers
17 views

Cannot read properties of undefined (reading 'length') when deploying Mock Aggregator

I am trying to deploy Mock Aggregator, but getting the error as TypeError: Cannot read properties of undefined (reading 'length') This error is from the internal module called hardhat deploy I went ...
Sam's Show's user avatar
0 votes
0 answers
7 views

what would happen to a transaction only has base fee without tip

When sending a transaction to Ethereum network, the total gas you pay is divided into two components: the base fee and the priority fee (tip). A transaction that only pays the base fee is technically ...
Joey Yi Zhao's user avatar
0 votes
0 answers
18 views

Got metamask connection disconnect when sending a transaction

I am building a dapp with web3 and call smart contract running in sepolia testnet. I have below code to send transaction: provider.request({ method: 'eth_sendTransaction', params: [ ...
Joey Yi Zhao's user avatar
0 votes
1 answer
29 views

Get unknown account when sending transaction to ethereum testnet network

I am using web3 library to send transaction to Ethereum testnet network. Below is the code: const w = new web3(process.env.NEXT_PUBLIC_ETHEREUM_NETWORK); const transaction: Transaction = { ...
Joey Yi Zhao's user avatar
0 votes
0 answers
34 views

How can I get private key from metamask when sending a transaction?

I am using web3 to send a transaction to smart contract in ethereum network. web3 library has a method web3.eth.accounts.signTransaction(tx, privateKey [, callback]); to sign a transaction but it ...
Joey Yi Zhao's user avatar
0 votes
1 answer
27 views

Feeding a Smart contract with large Data

I want to feed a smart contract with multiple 5000 or more wallet addresses (for whitelisting purposes) in an array in a single transaction. How can I achieve that without sending data in chunks? ...
Bhushan Dhiware's user avatar
0 votes
1 answer
51 views

What is the different between transaction fee and gas price?

I deployed a smart contract to sepolia network https://sepolia.etherscan.io/tx/0x8b309fd585d6f0196dddc5754038e06ef9693f4fd852ec27b02c320a1bc725f5 From the dashboard there are two price, Transaction ...
Joey Yi Zhao's user avatar
0 votes
3 answers
32 views

Why doesn't `transfer` to owner change its balance?

I am building a contract to transfer ether to the contract's owner and test it via hardhat. I found that the owner's balance doesn't change after the transfer. below is the contract code: contract ...
Joey Yi Zhao's user avatar
1 vote
0 answers
18 views

Solidity: getStudentNotifications Retrieves notifications to other metamask account instead of one metamask account

I have two metamask accounts, one is Vamshi (student) and Mike(University). I use Vamshi's account to call the function sendRecordsToUniversity and the university address, I use here is Mike's. so the ...
Robert Downey Jr.'s user avatar
1 vote
2 answers
28 views

How does the real Ether work in ERC20 protocol?

I am reading ERC20 protocol and learning how that is implemented from OpenZeppelin: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol The code demoed ...
Joey Yi Zhao's user avatar
0 votes
1 answer
19 views

Why is the gas fee shown on Ether scan is different than the transaction I sent?

I sent a transaction to Ethereum test network sepolia as below code: const transaction = { from: account.address, to: contractAddress, gas: 202419, ...
Joey Yi Zhao's user avatar
0 votes
1 answer
65 views

Does hardhat-trace work on localhost?

I'm trying to troubleshoot my hardhat project's smart contract, but every time I run npx hardhat trace --hash [transaction hash] I get the error Transaction not found on rpc. This has me wondering if ...
Trent Kennelly's user avatar
0 votes
2 answers
71 views

Send a transaciton to Sepolia network but it can't be found from `sepolia.etherscan.io`

I am using below code to call a smart contract deployed in Sepolia network. const w = new Web3('https://rpc.sepolia.org'); await w.eth.accounts.signTransaction( { from: ...
Joey Yi Zhao's user avatar
1 vote
1 answer
13 views

Do I need private key each time when call smart contract?

I am using web3 library to connect to smart contracts deployed in Ganache/Ethereum network. I don't need to sign a transaction when interacting with Ganache network probably because it is a test ...
Joey Yi Zhao's user avatar
0 votes
1 answer
44 views

How do I know the gas and gas limit when sending a transaction?

I am using below code to call a smart contract method on Ethereum network. const w = new Web3(url); await w.eth.accounts.signTransaction( { from: account.address, ...
Joey Yi Zhao's user avatar
1 vote
0 answers
15 views

How to you fetch all transactions ERC-20/ERC-721(swap, mint, burn) of a wallet?

I'm looking for an API that will give me exactly All transactions for a wallet, clearly broken down and labelled as Nft transfers, erc20 transfers, Nft purchases, token swaps etc. I've seen Moralis ...
Haseeb Saeed's user avatar
1 vote
1 answer
152 views

Transaction reverted: function returned an unexpected amount of data when requesting Institution Data

I am trying to request for Institution details which returns two or more data but getting these error. Error: Transaction reverted: function returned an unexpected amount of data at Institution....
Nikhil Raj's user avatar
0 votes
1 answer
59 views

Cannot able to deploy contract having parameter

I am trying to deploy Certification.sol in my unit test but it's giving me error. TypeError: unsupported addressable value (argument="target", value={ "args": [ "...
Nikhil Raj's user avatar
1 vote
1 answer
22 views

Getting error when trying to get Transaction Events Logs

I am trying to check whether an event is emitted or not in my unit test. But getting error as length undefined. The error I am getting is TypeError: Cannot read properties of undefined (reading '0') ...
Nikhil Raj's user avatar
1 vote
1 answer
53 views

What is the metamask algorithm for creating accounts based on one seed phrase?

Metamask uses one seed phrase to generate other accounts. Thus, with one seed phrase you can restore all accounts. But what is the algorithm for this? I want a script that could show 10 of my accounts ...
Илья Зелень's user avatar
1 vote
0 answers
15 views

Deployment is getting stuck in Raffle contract

I am not able to deploy Raffle contract as it is getting stuck. Here is image of the error. It is not completing only. Here is my Raffle contract // SPDX-License-Identifier: MIT pragma solidity ^0.8....
Nikhil Raj's user avatar
0 votes
0 answers
13 views

send the request to take(transfer) the bid price without any confirmation from the bidder when the seller accept the bid offer

When an NFT seller attempts to sell their NFT using the "sell to the highest bid" option on OpenSea, and a bidder tries to place a bid, the price value set by the bidder will not be ...
unni krishnan's user avatar
0 votes
0 answers
82 views

eth_sign invalid "from" address in signature in Trust Wallet browser extension or 0 balance when user has money

Problem I have code for sending 1 dollar from user to my account. It always works for all wallets except the trust wallet extension (trust wallet mobile works also). When I watch the result ...
noofdmsl1987's user avatar
3 votes
2 answers
1k views

TypeError: invalid BytesLike value (argument="value", value=[ ], code=INVALID_ARGUMENT, version=6.10.0) in testing Raffle Contract

While testing the Raffle contract, I am getting error in the line written "await network.provider.send("evm_increaseTime", [Number(interval) + 1]); await network.provider.send("...
Nikhil Raj's user avatar
0 votes
0 answers
15 views

Why doesn't `transfer` method change balance?

I have a smart contract to deal with payment as below code: // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "hardhat/console.sol"; contract PaymentChannel { ...
Joey Yi Zhao's user avatar
0 votes
0 answers
27 views

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

when i try to run this code use npx hardhat test in terminal give me output TypeError: Cannot read properties of undefined (reading 'map') this is my code file Escrow.js const { expect } = require(&...
Royhan Nulloh's user avatar
0 votes
0 answers
16 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
15 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
26 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
91 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
74 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
129 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
44 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
67 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
267 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
219 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
  • 367
0 votes
1 answer
30 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
17 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
25 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
50 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
40 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

1
2 3 4 5
16