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
15 views

Metamask installed in browse chrome but when I check in console window.ethereum it respond undefined

I am trying to connect my contract through infuria in Rinkeby and connect Metamask to web3 as injection to give autherization. I successfully installed Metamask and deployed my contract, the problem ...
user avatar
  • 101
0 votes
1 answer
14 views

How do I send my custom erc20 token from ethreum to arbitrum?

I am trying to send my custom erc20 tokens from ethreum (testnet) to arbitrum(testnet) through arbitrum bridge. But not sure if I had to map my token first or arbitrum bridge does that itself? How ...
user avatar
0 votes
0 answers
8 views

Error not triggered on wrong RPC

I have a weird behavior when I call a function (mint) with a wrong RPC...First of all let me show you a function triggering properly an error in my code: const fetchBalance = (addressTemp) => { ...
user avatar
  • 11
0 votes
0 answers
10 views

Which chain do I choose for social tokens?

I am planning to launch social tokens. I was first planning to launch it from polygon, but now I feel if I launch it on polygon, I will not be able to use it on ethereum. So now I think ethereum is a ...
user avatar
0 votes
1 answer
72 views

Unable to validate signature using validateERC721OrderSignature(order, signature) function on the ERC721OrdersFeature.sol contract (0xv4)

We are building a NFT marketplace using the 0xv4 NFT contracts. We successfully completed integrations for onchain order processing, but are having a difficulty with offchain order processing. We ...
user avatar
0 votes
2 answers
35 views

Transfer ERC721 tokens in BULK to single address

I want to know what is the gas effective manner to code to transfer many (e.g 1000) ERC721 tokens to a single address. I have tried the way below but I want something more efficient. function ...
user avatar
  • 61
0 votes
0 answers
13 views

Getting issue while installing @ethereum-alarm-clock/cli

Ran Command : npm i -g @ethereum-alarm-clock/cli Issue received below : I am able to install other packages though, Is there something i need to do? while npm i -g @ethereum-alarm-clock/lib , I got
user avatar
0 votes
0 answers
17 views

Compare from Opensea API (assets > owner > address) with metamask address

Creates a test project. In my project, I would like to create an NFT verification. I would like to compare the API opensea if the owner has an NFT token on his wallet. The problem is that the account =...
user avatar
0 votes
0 answers
34 views

Recommendation for blockchain network selection

Is it a good idea to use fabric for one network, one organization (with multiple users), and storing transactions between those? or should I use a simpler blockchain network? I want the transaction to ...
user avatar
0 votes
1 answer
38 views

How can I use my polygon erc20 custom tokens on other chains?

I am planning to launch polygon erc20 coin. But I have come to learn recently that interchain smart contract interaction is not possible. If I want to use my polygon coins as a payment on ethereum ...
user avatar
0 votes
1 answer
16 views

How much data can I read from Smart contract, Is there a limit

We are aware that reading data is free from the Ethereum Blockchain. Is there a limit to the amount of data I can read? If someone runs a never-ending loop on the call, WIll block chain still give ...
user avatar
  • 105
0 votes
0 answers
29 views

How can we implement a use case where user need not sign transaction repetitively?

How can we implement a use case where user need not sign transaction repetitively? I want to create a marketplace but dont want to adopt Fiat payment mechanism? Also, I want to reserve my user's ...
user avatar
0 votes
0 answers
17 views

Web3js send method promise response when user refresh the page

I have a website that connect with a smart contract throught metamask provider. I'm using the send method and I'm managing every posible response of the promise, as on "confimration", on &...
user avatar
0 votes
1 answer
11 views

Can we change ERC721 mapping Access Modifier?

I am using openzeppelin ERC721 smart contract. That smart contract have a mapping's called : mapping(address => uint256) private _balances; mapping(uint256 => address) private _owners; Can we ...
user avatar
0 votes
0 answers
8 views

Problems sending tokens. The value you send should be less than your current balance

Im having this issue. I understand that: I have Contract A and Contract B If Alice has 100 tokens, and calls transfer on contract A, Alice's tokens are going to be transferred. If Alice has 100 tokens,...
user avatar
  • 13
3 votes
1 answer
71 views

Hardhat local transactions don't process

I'm new to hardhat. I am playing around with the local hardhat accounts, which are all funded for 10k ETH. All I want to do is send some ETH from 1 account to another, and check the second account's ...
user avatar
  • 31
0 votes
0 answers
44 views

Getting "Expected private key to be an Uint8Array with length 32" when running a transfer function on ropsten testnet through my terminal

i am trying to send a transaction but it throws an error. MY CODE: var Tx = require('ethereumjs-tx').Transaction const Web3 = require('web3') const web3 = new Web3('https://ropsten.infura.io/v3/...
user avatar
1 vote
2 answers
22 views

Is the key generated below valid and cryptographically secure?

For some reason, my React Native 0.68.0 app needs to generate private key for the Ethers wallet providing accessing to crypto.getRandomValues. The crypto.getRandomValues is polyfilled by react-native-...
user avatar
0 votes
1 answer
62 views

Is it possible to run hardhat node & hardhat deploy in Github Actions? | Github Action Stuck for hours

Currently using the code below for Github Actions to test local deployment. However, my github actions have been stuck for hours on Test deploy. Any ideas on how I can fix it? # This is a basic ...
user avatar
0 votes
1 answer
43 views

How to call a function of a smart contract if I only know the address of that contract in hardhat script?

I have a factory contract which creates a child contract upon calling a createChild function and emit an event that has the newly created child contract address. Now how to call any function of the ...
user avatar
0 votes
1 answer
166 views

use javascript merkle tree to generate hex proof for solidity merkletree validation

Here is my js code of generating hex proof for solidity verification const express = require('express') const { MerkleTree } = require('merkletreejs'); const { bufferToHex } = require('ethereumjs-util'...
user avatar
0 votes
0 answers
96 views

How to interact with a smart contract with ethers.js?

I need a general-purpose method to call functions from a smart contract using ethers.js. I've always used web3 and I'm trying to transition over; however, I cannot find any good examples of calling ...
user avatar
0 votes
1 answer
30 views

How to detect emit in another contract using hardhat?

I'm trying to replicate expectEvent.inTransaction() from @openzeppelin/test-helpers for hardhat. The scenario: token is transfering from owner to receiverContract. I want to check that ...
user avatar
  • 113
0 votes
1 answer
105 views

How to override transactionObject `{from: xxx }` in hardhat?

I'm trying to write a test to check if an approved address can transfer the owner's token. However, whenever I try to call token.transferFrom() with a transactionObject of {from: approved.address}, it ...
user avatar
  • 113
0 votes
1 answer
17 views

Reading Contract Events

i have an promlem readen a Hash from ethereum logs. When a user Mints a token, i fire a mint event: event Mint(address indexed _to, string indexed _hash, uint256 _tokenId); Example for _hash = ...
user avatar
0 votes
1 answer
35 views

Send erc20 token with pay another address

How can I do send USDT from Address A to Address B and pay fee from Address C with ETH. I don't want to send gas from Address A and Address A only has USDT. Does anyone have a sample code?
user avatar
  • 1
0 votes
0 answers
24 views

Javascript code for storing data in blockchain

I wrote this solidity contract for an 'Online Birth and Death Registration system' to enable me to store data in the blockchain but so far it does not seem to work. The problem is I don't know how to ...
user avatar
0 votes
1 answer
22 views

What format is the second parameter of eth_sign?

{"jsonrpc":"2.0","method":"eth_sign","params":["**", "0xdeadbeaf"],"id":1} Here is an example Ignoring the first ...
user avatar
0 votes
0 answers
39 views

eth_newPendingTransactionFilter filter fails but recovers

Context: Using json rpc calls and a quicknode endpoint I create an eth_newPendingTransactionFilter and then use the response id to get filter changes in the mempool. Every 100ms I trigger the ...
user avatar
  • 103
1 vote
2 answers
36 views

Does a crypto exchange website need to run its ethereum node?

I am learning about ethereum-based crypto exchanges, and I tend to 'scratch my head' often. Does a crypto exchange website need to run its ethereum node? (Is it necessary for the ethereum server to ...
user avatar
0 votes
0 answers
37 views

use backend to interact with smart contract?

I'm currently working on the deployment of a smart contract for NFTs. We started by adding metamask on frontend side which act as a provider and signer. Recently we would like to add walletconnect. ...
user avatar
1 vote
0 answers
34 views

Signed a lazy minting voucher .How can i list the nft in opensea

This is my voucher code : async function main() { const [admin, minter, relayer] = await ethers.getSigners(); console.log(`Sign authorization:`); const registry = (await attach('...
user avatar
0 votes
0 answers
128 views

What does `hardhat_impersonateAccount`/`hardhat_stopImpersonatingAccount ` exactly do to the given address on hardhat?

Let's say I used hardhat_impersonateAccount method to impersonate an account and get a Signer: const imposter = "0x364d6D0333432C3Ac016Ca832fb8594A8cE43Ca6"; await hre.network.provider....
user avatar
0 votes
0 answers
40 views

How to send a pre-EIP155 transaction from transaction data

Suppose I have some transaction data that is compatible with pre-EIP155 ethereum (before the spurious dragon hardfork) and therefore also (hopefully ?) backward compatible with all the updated ...
user avatar
  • 167
0 votes
1 answer
88 views

Uncaught TypeError: web3 is not a constructor. the blockchain website cannot connect to metamask

i have issue on web3 = new web3 (web3.currentProvider); below is the code. it said web3 is not a constructor. is it like the capital letter issues? the version of my web3 is "^1.3". var ...
user avatar
1 vote
2 answers
248 views

How to recover the public key from r, s and v without the private key

I would like to recover the public key (or address) from the r,s and v values of a signed transaction without using a private key. The idea of course being, that I want to use Nick's method to deploy ...
user avatar
  • 167
0 votes
0 answers
8 views

Decentralised Nft AuctionHouse [duplicate]

I’m building a decentralised NFT Auction House for people that already have their ERC721 contracts deployed. My doubt is - how can I take nft’s from them and list on my marketplace for auction. I don’...
user avatar
0 votes
0 answers
15 views

cosloe log multiple variables returned from Solidity functions

So I have a Solidity function which returns multiple values: function getReserves() external returns (uint112, uint112) { require(UniswapPair!= address(0), "Create Pair first"); ...
user avatar
  • 1
0 votes
0 answers
35 views

i am trying to sign a voucher with _signTypedData for the purpose of lazy minting.but my code is not working .need help?

this is my JS code plz have a look import { useState, useRef } from "react"; import { ethers } from "ethers"; import ErrorMessage from "./ErrorMessage"; // These ...
user avatar
0 votes
2 answers
23 views

Is there any method that i can show a "Insufficient TOKEN balance" in metamask?

for example: I want to buy a blind box, using a ERC-20 token. Is there any method that i can show My TOKEN Is Not Enough in metamask?
user avatar
0 votes
0 answers
13 views

Tokens and ICO relationship

1.) I am little confused with Total Supply in Token as I used ERC20 interface. So how is the totalSupply is going to be affected after each transfer() ? 2.) Is it necessary to have ICO for token or ...
user avatar
0 votes
1 answer
84 views

approve() function DAI on rinkeby

Cloned Rinkeby test network on local and trying to add liquidity to DAI-BAT pool after creation of the pool. Here is the addLiquidity function for reference: pragma solidity >0.7.0; //import the ...
user avatar
  • 1
0 votes
1 answer
83 views

Approve a single token ID in ERC1155 token standard

I am facing an issue when i am trying to give approval to the operator to burn my token in ERC1155. The issue is i want only to give access to the particular token id with a particular amount. But ...
user avatar
1 vote
2 answers
233 views

Truffle compile --list not showing latest versions of compiler

truffle compile --list not showing version "0.8.0" and above. truffle compile --list returns : ✖ Fetching solc version list from solc-bin. Attempt #1 ✖ Fetching solc version list from solc-...
user avatar
2 votes
0 answers
56 views

Why am I getting TypeError: ENS is not a constructor when using ensjs library?

I am trying to get address using ens domain but when I use the below code snippet it gives me TypeError: ENS is not a constructor, have I written it in the right way? import ENS, { getEnsAddress } ...
user avatar
  • 21
0 votes
1 answer
34 views

Is it okay to relay on the web3.eth.sign to always be deterministic?

I am using web3.eth.sign(message, address); to generate digital signatures signed by the users private key. Currently the digital signature returned is deterministic given the same message and account....
user avatar
  • 7
0 votes
0 answers
42 views

What's the best way to create an API that returns NFTs data

I'm curious web3 developer. I've been researching several NFTs marketplace and I'm wondering how are they returning all the NFTs based on Contract Address. For example, LOOKSRARE has an API that ...
user avatar
0 votes
0 answers
45 views

Which Node RPC Binance Smart Chain no rate limit request/sec?

Some rpc nodes Binace Smart Chain are now rate limited to 25-30 requests/sec ..I want to ask where to rent unlimited packages request/sec
user avatar
  • 1
0 votes
0 answers
10 views

Prevent malicious activity on IPFS public node is a social media website

I have built a Social Media website based on Ethereum blockchain. I am saving all my content on ipfs. I am using ipfs-http-client in order to communicate with ipfs. I saw a post on ipfs discussion ...
user avatar
  • 33
0 votes
0 answers
20 views

State Change Of An Account For A Transaction?

Was wondering if there's a way to see the state change of an account given a transaction? As an example in js: const changes = await txChanges(MY_ADDRESS, txHash); // outputs something like // { ...
user avatar

1
2 3 4 5
14