New answers tagged

0

My metamask has been compromised, as soon as eth is deposited it is automatically shipped to another address, however I still have numerous other coins in there. How can I transfer them out without eth that will just get stolen the minute I deposit it. Any help would be amazing.


0

ok, i know Signature information of eth.sign needs to be treated with web3.sha3 but personal.sign don't need it


0

In the MetaMask setting > go to advanced setting > turn on custom nonce. After turning on Custom nonce, you can add your custom nonce before making any transaction. The custom nonce should be the account nonce. Here in this case it is 4. (you can get the account nonce in the error) If this works for anyone please let me know.


0

First of all: Never use a seed phrase which you used in an insecure 'non-hardware' 'wallet (like metamask) for your Ledger. The best approach is to create new seed phrase generated in Ledger and transfer the Ether to the new generated account. The fees are not the problem, we are talking about 1$ depending on the GAS you like to spend. Try it with a small ...


0

To connect to Metamask and recover the wallet an user needs respectively a password and a seed : seed (also called mnemonic) : 12 secret words generated from the private key. You should never share these words, as they enable to access your funds. The seed is the only thing one need to recover his wallet. The password : it encrypts the account locally, that ...


1

You can get the function you're calling on a contract, by checking the first four bytes (called the method signature) of the transaction data, and the ABI of a contract. You can find a detailed explanation of transaction data here. MetaMask keeps a registry of common method signatures and their corresponding description stored in a smart contract (...


0

Updated code. Thanks @goodvibration! donate = async () => { const donationAddress = "0x..."; const accounts = await web3.eth.getAccounts(); this.setState({ account: accounts[0] }); web3.eth.sendTransaction({ to: donationAddress, from: accounts[0], value: web3.utils.toWei("1", "ether") ...


1

You sent your 400 UNI tokens to the UNI contract itself. Unfortunately, this means that you lost them forever. When you are transferring ERC-20 tokens, the "to" field must be the address of another Ethereum account, not the address of the ERC-20 contract itself. Related post: I accidentally sent a token to a token contract. Can I get it back?.


1

Unsure where to start. Ethereum, at its core, is not insecure in any sense. It has been proven time and again to be secure and it works as intended. Now, let's list some things which are not part of the Ethereum core which may be insecure: Wallets. These are created by an arbitrary third party and their security can be whatever. Smart contract. These are ...


0

In metamask update your chainID to the private network ID. It worked for me


0

Install ethereumjs-wallet package npm install ethereumjs-wallet Create file export-key-as-json.js with the following content; const fs = require("fs") const wallet = require("ethereumjs-wallet").default const pk = new Buffer.from(process.argv[2], 'hex') // replace by correct private key const account = wallet.fromPrivateKey(pk) const ...


0

Let's talk about what's going on, and then talk about a potential solution for the OP's specific case. When generating many accounts from one seed, there is a master keypair (public and private keys, just like a regular keypair), and then the other accounts have their private and public keys generated from that keypair. The generated accounts do not have the ...


2

Now that window.web and ethereum.enable() are deprecated, the recommended way to connect to MetaMask is with ethereum.request(). The function takes an object with a JSON-RPC method (like eth_requestAccounts) and returns a Promise. For example: if (window.ethereum) { try { const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' });...


0

The issue I had is that I was serving the html and js files using the file:// in chrome. Metamask doesn't support as per here that so I had to install the HTTP-server using these steps: 1> Have Node.js installed in your system. 2> In CMD, run the command npm install http-server -g 3> Navigate to the specific path of your file folder in CMD and run ...


0

You can try to import the wallet into myetherwallet.com or mycrypto.com app. What you need is add the contract address for the token if its not included as standard in your wallet of choice.


0

In my case I had the extension to only work in certain sites, but changing the option to On all sites, that might work.


0

I think you can find the answer in following link It seems like they use a binary search to calculate estimated gas based on the opcodes.


0

Just refresh the page once. Metamask does not respond instantaneously. Also there were some variable name errors in the code (like using candidatesCount instead of Candidate), that I corrected.


0

Referncing the documentation: web3.js v1.3.1 solc version: 0.8.0 web3.js version: 1.3.1 Suppose following is your smart contract: contract myContract{ constructor(int a, string memory str){ // Some code using the arguments. } } Following is how you deploy the contract: var intObj = 10; var strObj = 'Hello'; contract = await new web3.eth....


0

To the entropy from the user's password, you need to add the time and date of the password creation, as well as any geolocation. In this case, the entropy will be more universal.


1

There was no problem with the send request that I have written. The problem was with the provider, which I have not assigned properly. In my web3.js file, previously this was written: web3 = new Web3(window.web3.currentProvider.enable()); I changed this to: window.web3.currentProvider.enable(); web3 = new Web3(window.web3.currentProvider);


1

For this use-case, Metamask is only used as a wallet to hold ERC20 tokens and sign transactions to transfer them, but you don't need to select any token (but just have them already). On the other hand, every ERC20 token has its own contract address, so you need to manage it through your smart contract or your frontend/backend via web3.js or ethers.js. If you ...


0

MetaMask will no longer be injecting web3, so it's not good practice to rely on it. I used the ethers.js library. I had to pull that in to my project using rollup.js, but you could also use bundler or webpack or whatever. const { ethereum } = window; if (ethereum) { var provider = new ethers.providers.Web3Provider(ethereum); } ... const ...


0

What you need is a web3 client library to interact with the Smart Contract, from the client app. I recommend you to start playing with javascript clien libraries, with Metamask installed in your browser, like: web3 ethers.js Try to develop a javascript application, with no backend, except Ethereum Smart Contracts, that you can easily start developing in ...


1

You need to request Ether in a faucet. If you select "buy" option in Metamask extension, you will see 2 options, the one in the bottom says "Try Faucet", and it will lead you to: https://faucet.metamask.io/ Also, you can copy your address in Metamask, and paste it here: https://faucet.rinkeby.io/ There are more public faucets, if you ...


Top 50 recent answers are included