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
1answer
14 views

Cant create initial liquidity in safemoon fork

Followed the initial steps provided at the openzeppelin community for adding initial liquidity to a pool but still, cant do step 2. here's the original answer which is not working - https://forum....
0
votes
1answer
12 views

How to sign a transaction using web3.js and ethereumjs-tx on the BSC testnet

How do I sign and send a transaction using web3.js and ethereumjs-tx on the BSC testnet? I have found this question and answer: Is it possible to send transaction in Binance Smart Chain using web3 and ...
0
votes
0answers
9 views

geth peering between GCP VM and RPI failed

I have configured 3 ethereum nodes 2 in GCP VMS 1 in RPI All are Ubuntu based Miner1: geth --identity "miner1" --networkid 42 --datadir "~/RPI/miner1" --nodiscover --mine --rpc --...
0
votes
0answers
5 views

Python API Get historical transactional dollar value

I am able to see the UI visual tool such as https://etherscan.io/tx/0xa4957d2f3527fd10ca106211fdc13125bc92a659c2957247057fcac31beb133e for fetching the dollar value at the time of exchange rate. ...
0
votes
0answers
21 views

Web3js works in my localhost NODE server but return an error in my remote webserver

All Web3js functions works correctly in my NODE (10.7.0) localhost server but the same configuration return the next error in my remote NODE webserver (same configuration and versions). Any idea? ...
1
vote
1answer
11 views

multiple arguments giving error web3 [closed]

.addMedicalReport( patientBio.id, patientBio.name, patientBio.birthDate, patientBio.phoneNumber, patientBio._address, patientBio.MedReportId, ...
0
votes
0answers
3 views

UnhandledPromiseRejectionWarning when attempting to send a signed transaction

I was able to create a rawTransaction and sign the transaction without issue with the code below. var rawTransaction = {"from":myAddress, "gasPrice":web3.utils.toHex(yessir),"...
1
vote
1answer
9 views

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

I'm trying to query a contract function that takes uint256 as input via Etherscan's API but I keep getting error messages. The format I've realized should be as follows based on this answer: http://...
0
votes
0answers
5 views

Getting error on refreshing page react dapp using drizzle?

I am working on a dapp, it is working fine but one problem I am facing and it stuck my development. Please solve this if anyone knows how to do this and may be I am missing something?? PROBLEM when ...
0
votes
1answer
27 views

Confusion around AmoutOutMin with swapExactETHForTokens call

I don't understand the paramater AmountOutMin for this function. From the docs, it seems that the call will fail, if the amount specified by this parameter, is not transferred to the user. However, in ...
0
votes
0answers
23 views

Web3: Error Number can safely store up to 53 bits

I'm working on a sniping/scanning bot to improve my web3 knowledge. I'm running the latest (1.3.5) web3 package and connecting to the official BSC testnet rpc. The follow code runs and logs between 2-...
0
votes
1answer
23 views

How is the output of a contract call encoded?

Hi I have a proxy contract A which delegates function execution to implementation contract B using the standard OpenZeppelin code: assembly { calldatacopy(0, 0, calldatasize()) ...
0
votes
0answers
8 views

Does Dapps such as Uniswap and Sushiswap transactions are made 100% on-chain?

I'm just wondering, it looks like Dapps such as Uniswap and Sushiswap transactions are made 100% on-chain, because some claimed those apps are 100% decentralized. Is it true that all transactions are ...
0
votes
0answers
11 views

Getting Pending Eth Transactions related to a contract

I noticed you can call: "web3.eth.subscribe('pendingTransactions') and then call web3http.eth.getTransaction(txHash); to get the full details of the transaction (which then you can filter ...
0
votes
0answers
23 views

How to secure metamask to avoid theft

I have a website with NODEJS and it's a Dapp. There is some button to click and open MetaMask for signing a transaction. I think an attacker car replace my ABI+Contract address and inject them with ...
2
votes
1answer
39 views

web3js.eth.getAccounts() and ethersjs.listAccounts() always returning one account in an array even when more are in metamask?

I have tested web3js.eth.getAccounts() of web3js and ethers.listAccounts() of etherjs and they are returning an array with a single account although my metamask has one or more accounts. Is this the ...
0
votes
1answer
31 views

Is ABI necessary for calling ropstend smart contract?

I only have ropsten's smart contract address, so I'm trying to get it through web3.js with: window.web3.eth.Contract(abi, address) but i see in the documentation it receives two parameters, i don't ...
0
votes
0answers
16 views

VM Exception while processing transaction: revert - buying transaction

Hey bit of a newbie to ethereum dev over here. I'm building a marketplace for ERC 721, currently, i've been getting this error when I called in buying method. Contract code: function buyJam(...
1
vote
0answers
12 views

How to send multiple function arguments to solidity smart contract from react.js using Drizzle?

I am trying to call a function of solidity contract that takes in multiple arguments(8 arguments). This is my contract function. function generatePet( uint256 _petPrice, ...
0
votes
0answers
9 views

The Graph Compound API

I want to build a small project to simulate app.compound.finance (with just eth token let's say) with The Graph , how can I get supply/borrows balance per users? (my defi app initial setup is done, ...
0
votes
0answers
22 views

Nodejs API to Solidity data transfer

I want to know that how can I transfer Nodejs API call response to Html, where for every call or response gas will be consumed by help of Solidity from the Ganache Ethereum account.
1
vote
0answers
41 views

eth_estimateGas Error when balance of an account < the amount to send in a transaction

I have used the following request to estimate gas in an ETH transaction in Ropsten. ## JSON-RPC over HTTPS POST curl https://ropsten.infura.io/v3/YOUR-PROJECT-ID \ -X POST \ -H "Content-...
1
vote
0answers
28 views

How to let the user sign a nonce in frontend and check the authenticity in the backend?

My frontend code: html (using cdn, couldn't make the npm run...): <script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script> javascript: web3.eth.personal....
0
votes
0answers
23 views

how to pass my arguments to constructor smart contract while deploying using web3 truffle

could you please help me with this step? I have a smart contract with a constructor with a parameter, but I don't know how to pass this parameter when deploying the smart contract using truffle and ...
1
vote
1answer
43 views

ERC20 token transfer attempt resulting in underpriced (price change attempted)

It's almost an exact copy of this but when I ran it, I get the following error message. (node:5189) UnhandledPromiseRejectionWarning: Error: Returned error: transaction underpriced Below is the code ...
1
vote
0answers
9 views

Acceptable response types with using Chainlink client contract

I want to consume a Github API via the Chainlink Client Contract, the API returns an array of objects wanted to know can that be handled or I need to write a handler?
1
vote
0answers
8 views

How to modify the Block Information in geth levelDB?

I want to change some information such as stateRoot or some other information for testing purposes in levelDB. Is that possible? If so, how?
0
votes
0answers
19 views

How can we run a malicious node on a Private Ethereum Network (geth)?

I am running multiple nodes on a private Ethereum network (get) but I want one of the nodes to run maliciously (Maybe changing the stateRoot manually in levelDb). How can I do that?
4
votes
1answer
40 views

How to convert public key (64 bytes) to compressed public key (33 bytes)

I currently have a generated 64-byte public key that has been recovered from an Ethereum transaction. How do I convert this key into a 33-byte compressed public-key? The problem I'm having seems ...
1
vote
1answer
107 views

metamask eth_sign can't make it work

I have this: ethereum.request({ method: 'eth_sign', params: { from: account, //this is the address message: '0xfafa' } ...
0
votes
0answers
266 views

What is bsc testnet node address?

i am making a swap system. I do it on binance smart chain network. What are test nets? I examined it on the binance official page, but I could not reach a clear conclusion. What I got in the comment ...
2
votes
2answers
853 views

Expected private key to be an Uint8Array with length 32

i am trying to send a transaction but it throws an error. still i am not sending any transaction just signing it... Error: Expected private key to be an Uint8Array with length 32 at assert (C:\web3\...
0
votes
0answers
23 views

ETH sent to an address that was generated for contracts, how can I recover?

I have transferred money to an ethereum address that belongs to the smart contracts. const priv = "0x" + crypto.randomBytes(32).toString("hex"); const pub = "0x" + util....
1
vote
1answer
474 views

connecting to Metamask using React.js and Next.js without having to refresh the page each time

StackShare question Hello, I am having a problem with connecting to Metamask dynamically. I created a voting website using React.js and Next.js, and was using UseEffect() to connect to Metamask. ...
1
vote
1answer
40 views

how to call a function of a smart contract from a c program using JSON-RPC

Indeed, i installed ganache where i deployed a smart contract. I wanted to write a c program that would allow me to call the functions of my smart contract and read the messages. This program would ...
0
votes
0answers
29 views

Where should I put the estimate gas produced by the remix IDE in my code?

I'm creating the ERC20 smartcontract transfer with web3. I just want to use gas optimally so that users want to do token transfer. From the Remix IDE I got the GASESTIMATES. But I don't know where to ...
0
votes
0answers
16 views

Find ETH address with amount range (Query Big Data)

I'm trying to run a query similar to this: https://medium.com/google-cloud/how-to-query-balances-for-all-ethereum-addresses-in-bigquery-fb594e4034a7 But I would like to find ETH address: Ending with ....
0
votes
0answers
38 views

issue encounter when use swapExactTokensForETH

I try to "swapExactTokensForETH" I know that for this work you need to "approve to the router" so i when i call uniswap.approve(to, amountIn) it return Error: cannot estimate gas ...
1
vote
1answer
49 views

Exchange Deposit Smart Contract

I'm developing ETH and ERC20 tokens deposit service. for every user I need unique wallet address, Can I develop a smart contract to generate unique wallet address for every user? Can I transfer ...
0
votes
0answers
39 views

Sending transaction via nodejs backend , trying to send ether from one address to another

I am trying to send ether from one account to another I am using the modules web3, express and ethereumjs-tx. And also Infura rinkey as my provider. I am having problems that if the value is too high ...
0
votes
0answers
30 views

Ethminer connected and seems to be running fine (simulation was successful) but doesn't seem to be getting any jobs, is this normal?

Playing with ethminer, I can't tell if it's actually mining. I ran the simulation fine, then I connected to a pool but I am simply getting '''ethminer 0:06 A0 0.00 h - cl0 0.00''' It looks like ...
2
votes
1answer
134 views

How to generate solidity encode function signature from Javascript?

What I am trying to achieve is like , i should be able to call a set of solidity functions dynamically based on some criteria. i'm using call() method to achieve the same. (bool success, bytes memory ...
0
votes
1answer
18 views

Interacting with existing Smart Contract deployed on test network like rinkeby from local test environment (truffle)

I have forked rinkeby network using ganache-cli as shown below ganache-cli -f https://rinkeby.infura.io/v3/id --account="fsdfmsadklksmdflskamf" Now, I want to test my smart contract which ...
0
votes
0answers
26 views

What is the best practice when storing a custodial wallet with node.js and mysql?

I'm using Adonis.js v4 (it's node.js) and mysql (on RDS) as my database. I need to create an ethereum wallet for each of my user's and I need to make transaction on their behalf with their wallet (...
0
votes
0answers
21 views

How to sign batch transactions?

I use web3js, ethereumjs-tx libraries and infura http provider. Lets say we have a contract instance var contract= new w3.eth.Contract(abi,address); and i want to transact with the functions of that ...
0
votes
1answer
18 views

How can I create a similar application to YouTube on Blockchain? What is the cost of it?

How can I create a similar application to YouTube on Blockchain or as a smart contract? What is the cost of it?. I am keen on picking it up as a project. Thank you!
0
votes
1answer
27 views

Old contracts data not visible if pushed new contracts?

I created a contract campaign and deployed this contract in infura , then I called some functions of the contract which created the subsequent data(as in list of ongoing campaigns) in blockchain. In ...
0
votes
0answers
14 views

Any way I can see what information a specific peer is sending (or exchanging ) to my node in geth?

I'm trying to run some demo script at devp2p protocol in ethereumjs (https://github.com/ethereumjs/ethereumjs-devp2p/blob/master/examples/peer-communication.ts), but this example is running in ...
0
votes
0answers
17 views

dapp without test.js

We can test our smart contract in remix and can perform several workflow checks before putting the contract in the final sol file in the dapp project. This way we can ensure that everything is in ...
0
votes
1answer
393 views

Get ETH Wallet address list (holder list) given a smart contract address (erc20)

I would like to fetch the list of all ETH wallet addresses by an API(?), given a smart contract address (erc20 token address). Similar feature that we see on etherscan.io under the erc20 Holder list. ...

1
2 3 4 5
10