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

Retrieve and display Metamask transaction history

I am a beginner in blockchain codes and I want the user to click a button and view the transaction history in a website. I used ethereum solidity and atom(for html, js and css). Could someone teach me ...
0
votes
0answers
18 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
14 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
26 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
13 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
16 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
32 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. ...
0
votes
0answers
17 views

AttributeError: type object 'Transaction' has no attribute 'exclude'

When I execute a python script to deploy smart contracts, it throws the following exceptions: Traceback (most recent call last): File "contrCompDeploy.py", line 7, in <module> ...
1
vote
1answer
43 views

My signed transaction seems failed, and not broadcasted. why?

I want to do a very simple operation: send eth to another address. Here is what I did: Method 1 . use personal.send_transaction JSON-RPC interface. ( seems deprecated ) I run: curl --request POST --...
-1
votes
1answer
32 views

web3.js: How to convert Wei to Ether? [closed]

Im trying to covnert wei to ether in my node.js script let myBalanceWei = web3.eth.getBalance('0xF33b5a2B692bE695d6FD6f3136eB8919f2666e3a').then(console.log) let balance = web3.utils.fromWei(...
0
votes
0answers
13 views

Conflict Occurs on Getting Token holder address in Ethereum

I am creating a javascript code to get the holders address involved in the Transaction of my contract address. For eg I am creating a token and send it to multiple users so there will be multiple ...
2
votes
1answer
20 views

Accessing struct members

Can we access the struct member using a variable as we access in JavaScript? For example: struct Abc { uint256 a, uint256 b } Abc xyz; string memName = 'a'; I want to do something like ...
1
vote
1answer
21 views

not able to access metamask account, even if i manually connect website

I am trying to connect my website to metamask manually, still, I'm not able to access the account.enter image description here I'm able to read data from the smart contract but when I call a function ...
0
votes
1answer
20 views

Ethereum contract size limit for multipage contract

I got to know that there is a size limitation for Ethereum contract, but to avoid this I split up functions of my contract in two sol files and one contract extends other contract and this solve the ...
0
votes
1answer
38 views

Not persisting value with transaction

I have a contract that looks like this - contract Calculator { uint public result; event Added(address caller, uint a, uint b, uint res); constructor() public { result = 777; }...
0
votes
1answer
24 views

'@ethereumjs/common' giving error Common is not a constructor

I have installed "@ethereumjs/common": "^2.0.0", And and then using it - import Common from '@ethereumjs/common'; const c = new Common({ chain: 'ropsten' }) And getting error ...
2
votes
1answer
43 views

Ethereum transaction giving error 'invalid sender'

This is how my contract looks like - pragma solidity >=0.4.25 <0.8.0; contract Calculator { uint public result; event Added(address caller, uint a, uint b, uint res); constructor()...
0
votes
1answer
183 views

ETH vs ERC20 token [closed]

I am almost newbie. I understand that ETH is the currency for Etherium networks. I also do understand that ERC20 is standard for smart contract, which is used by Etherium based networks. Very often I ...
1
vote
1answer
97 views

How to sign and verify data with ethereumjs-utils?

In my contract I'm verifying if some data was correctly signed by the owner. It looks like this: require( owner() == ecrecover(keccak256(abi.encodePacked(this, aCustomId)), v, r, s), ...
0
votes
0answers
29 views

how to inject web3 on webapp with “window.ethereum.enable()”

here is my code, i dont get any pop for permission to connect metamask with the site. for more clearity visit enter link description here connect ...
0
votes
0answers
13 views

Ethereum data reading and writing time fluctuation for web3

I have created a web app for sending and receiving data in ropsten testnet. The average result of writing Data to the blockchain and reading it. The average is calculated for 5 transactions. Here data ...
0
votes
0answers
35 views

How to send a transaction to Besu configured as a Free Gas Network

I have downloaded and configured Besu as a Free Gas Network (https://besu.hyperledger.org/en/stable/HowTo/Configure/FreeGas/ ). Creating transaction using Truffle works fine, but not in my application ...
0
votes
0answers
22 views

Transactions fails in rinkeby but succeeds on localhost, gas limit 1000000 is cited

http://lucidity-eth-r.surge.sh/ Rinkeby test for buying funding token (search Honduras Agriculture Project, may have to click submit a few times), then go to funder view, and type in any amount/tenor. ...
0
votes
0answers
14 views

How can I delete values from nested mapping after a sum

I'm making an staking contract in solidity and i have used structs and nested mapping for saving users staking amount and its staking time, At the time of calling unstake function msg.sender will ...
1
vote
1answer
31 views

best way to get transaction timestamps?

I'm building an analytics app that tracks transactions on Ethereum and wondering how to get the most accurate timestamp for each transaction. Using the web3.js library I'm able to see the following ...
0
votes
1answer
36 views

Ethereum is not transferred on Ropsten network

Here's my code for signing nd sending a transaction on Ropsten testnet which is working properly. However, the value that is set to '1' eth is not transferred to the target address. var Tx = require('...
0
votes
1answer
62 views

ethereumjs-tx Returned error: invalid sender

When i am trying to send signed transaction via ethereumjs-tx. I get this Returned error: invalid sender web3Http.eth.getTransactionCount(myAddress,"pending").then(function(blockcount){ ...
0
votes
0answers
11 views

Can one ERC721 have two type NFT?

I am new to smart contract, I have to make NFTs so I am following ERC721 standard, but I have to make two types of NFT NFT1 = {prop1, prop2} NFT2 = {prop3, prop4} so can I have two type of createNFT ...
0
votes
0answers
11 views

Recursively search for Ethereum nodes

Hi I'm trying crawl the Ethereum network to get a full list of nodes including IP and client info in nodejs. I know that it's hard to achieve 100% accuracy on a p2p network but I would like to get ...
2
votes
1answer
39 views

Is there a way to verify transactions afterwards they are entered in the ethereum blockchain?

Suppose I sent a signed transaction using the web3.js library. But, I might be using some third party API like an Infura node or others. So there are chances of attacks and data manipulation. So, is ...
1
vote
3answers
140 views

How can i send ether to multiple address in one transaction by paying one transaction fee?

How can i send ether to multiple address in one transaction by paying one transaction fee. Like i want to publish multiple transaction at one go so i can incur only one transaction fee.
2
votes
1answer
33 views

Is there any contract to get USD value of Ether

I am looking for a contract address from where I can fetch current USD value of ether on fly, not looking for any api, so is there any contract for this ?
0
votes
1answer
193 views

Web3 error handling in React

This is really a two part question. First, the only way I can get the error message thrown by a Smart Contract require statement is to call the function first with a call rather than a send. send does ...
0
votes
0answers
16 views

any one please help when show QR for receiving erc20 token

any one please help when show QR for receiving erc20 token can i enter amount like "ethereum:ethaddress?address=contractaddress&uint256=token" not working "ethereum:...
0
votes
1answer
117 views

Cannot read data from smart Contract with web3 js

Im having trouble reading data from a smart contract I have following js script right here: (bcc-js.js) var contract_address = "0x88e304D8638c31DaC3336917bbE4A152927198D8"; var contract_abi =...
0
votes
0answers
471 views

Error: Returned error: gas required exceeds allowance (12487794) or always failing transaction

I am trying to use a script which uses web3.js to transfer a specific amount of ERC20 tokens .I have made this script in such a way that if account doesnt has ether value it will try again and again ...
0
votes
0answers
11 views

Rerendering causes results to display twice (possibly caused by async event emission)

This may seem like a web developer problem at first but i think it pertains to how function calls are done in solidity. So basically i have a voting application which triggers an event every time a ...
0
votes
1answer
103 views

All transaction pending a lot of time?

I wrote contract and deployed it on remix today but it takes over 5 min to confirm.And I tried to call function of deployed contract , but the transaction still takes several minutes and even I call ...
0
votes
1answer
149 views

How to use private blockchains in ethereumjs-tx@2.1.2?

I know this method var transaction = new Tx(rawTransaction, {chain:'ropsten'}); I tried var transaction = new Tx(rawTransaction, {chain:'192.168.XX.XX:8545'}); But get Error: Chain with name 192.168....
1
vote
0answers
29 views

How to get event from geth ethereum node using web3.js

I have created a simple contract where I am trying to write a value to a state variable in solidity smart contract, and emit that written value. I am using Truffle v5.1.28 (core: 5.1.28) Solidity - 0....
1
vote
0answers
229 views

Alternative to ganache

can someone please tell me an alternative to Ganache? Tried installing ganache on my laptop and it's not supported. Ganache works on 64 bit computers and mine is 32bit. Is there a way I can go round ...
0
votes
1answer
49 views

Which method is efficient to log data in blockchain? Send an event via smart contract or send data in a transaction without value?

I want to log data in Ethereum block-chain. It is obvious that we can create a smart contract that emits events and retrieve data from it. But is sending a transaction with data but no ETH value (just ...
4
votes
1answer
182 views

How is Chainlink decentralized? [closed]

I believe one of the main criticisms of chainlink is that it is not decentralized enough, adding more nodes would be a big step in a positive direction. When I pull data through a node, that node ...
1
vote
1answer
40 views

How is the volume for the currency pair accounted for on chainlink's reference data feed?

https://feeds.chain.link/ - link for reference. Let's take the LINK/USD feed for example: From my understanding, the aggregation contract fetches the price of LINK in USD from the node operators who ...
1
vote
1answer
65 views

Automatically register number into Kovan test net with signed transaction (Infura API + NodeJS)

I have a very simple Smart Contract deployed using remix.ethereum which is: pragma solidity ^ 0.6.0; contract primerContrato { uint storeddata; function set(uint x) public{ storeddata = x; } ...
0
votes
0answers
61 views

“TxRejectedError” Using Ganache with Web3

I am having trouble sending my transaction Using Ganache. I am showing the logic that creates and sends the transaction and it says it cant be found or it is rejected don;t really know what the error ...
0
votes
1answer
57 views

where to host my react fornt end and express endpoint that interact with smart contract to be fully decentralised?

where to host my react fornt end and express endpoint that interact with smart contract to be fully decentralised. Are there any option to host it decentralised any cloud provider other than ...
1
vote
4answers
162 views

TypeError: EthereumTransaction is not a constructor

var EthereumTransaction = require("ethereumjs-tx") var Web3 = require('web3') var web3 = new Web3('http://127.0.0.1:7545') //Setting Receiving and Sending Address var sendingAddress = ...
0
votes
2answers
48 views

Signature test failed at Truffle js

I'm trying to test validAddress function from my contract ValidationUser, using truffle and test with JS. I checked the V value from the signature and its 27,28 so it is not the problem. Also, I have ...
0
votes
0answers
27 views

In EtherJs how to find account number of balance change event?

I am creating Ethereum Wallet application & I am using EtherJs for Web wallet development. When I try to listen for Balance Change event for multiple accounts then How do I find account number ...

1
2 3 4 5
9