All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

how to use erc20 transfer in another contract in remix ethereum using metamask?

i read a lot of documentation in here and another web pages, i have a question and i so tried to solved but nothing works for me. i am using this example : https://forum.openzeppelin.com/t/example-on-...
0
votes
0answers
9 views

Golang list unlocked accounts from node

Wondering how would I access an unlocked account on the node (private geth) in golang. The flow I'm looking for is: 1. user unlocks their account (using personal.unlockAccount for example) 2. my app ...
0
votes
0answers
11 views

how transaction in block-chain is validated

Please explain complete procedure/journey how transaction in block-chain get validated by miners, From broadcast of transaction to become part of new block.
0
votes
0answers
6 views

Why HD wallet instance returns two xpub-xpriv key pairs inside Root and HDKey?

I have implemented address generation using HDWallet as shown in the snippet below: let Seed = generateMnemonic(); const wallet = EthHdWallet.fromMnemonic(Seed); console.log("Wallet" + JSON....
0
votes
0answers
7 views

Executing ContractFuzzer

I am trying to execute contractfuzzer. I found the link: [contractFuzzer link][1] The above link provides link to following page: docker container page but all the information is in a chinese ...
0
votes
0answers
15 views

Problem with reading balance

Following code shows reading of balance: function WithdrawBuggy(uint256 amount) public { uint256 bal = balance[msg.sender]; require(amount <= bal); balance[msg.sender] -= amount; ...
0
votes
0answers
12 views

wut is the sablier create stream example in web3js instead of ethersjs?

wut is the web3js for this ethers example from docs.sablier.finance: const sablier = new ethers.Contract(0xabcd..., sablierABI, signer); // get a handle for the Sablier contract const recipient = ...
0
votes
1answer
11 views

revert but mined

I ran a contract here, I got the message "Transaction mined but execution failed". Is this a vulnerability because the miner has to be paid: [vm]from:0xca3...a733cto:Will.deceased() 0xbbf......
0
votes
0answers
6 views

How to mock an ethers provider while testing with jest?

In the real app, I'm using the web3-react hook to inject the provider, etc. How do I best mock that/replicate that in a Jest Typescript environment?
0
votes
1answer
10 views

Testing Smart Contract with multiple clients

After deploying a smart contract on Ropsten Testnet using Truffle framework, we can use truffle tests to do unit testing (create a client to interact with the deployed contract). My question is, how ...
0
votes
0answers
9 views

How to send a value back to html from node.js using express and truffle

I am running truffle code with Node.JS in the backend to deploy contracts. Using the Express Library, I can interact with the Node backend. Here is the code for the HTML page: <form id="myForm" ...
0
votes
0answers
12 views

Create an account and assign it to end-user, and append more information to public-profile

So, I've setup a private ethereum network and plan to use uPort for better user identification for end-users. So basically I have two questions: 1- Is it possible to provision an account and its ...
0
votes
2answers
15 views

How does metamask know a contract is for ropsten or for main network?

Im using this code to detect for metamask. Now im using ropsten but i want to know how does metamsk know that my contract only works with ropsten? window.addEventListener('load', async () => { ...
0
votes
1answer
12 views

Testing library functions with Javascript & Truffle

I'm trying to test functions of a library with Truffle. But they don't seem to be available. The library is named Commons and I include it as I would include a contract: var Commons = artifacts....
0
votes
2answers
17 views

Can anybody here help me in understanding how transactions and block is getting verified [closed]

Please help me in understanding how transactions are getting verified and also how blocks are getting verified before appending it to the canonical chain.
0
votes
1answer
12 views

how to be notified about incoming transactions instantly?

I'm creating a platform which users are able to receive ETH on their own wallets (addresses). They will give the addresses to others, but the question is how can I be notified that new transactions ...
1
vote
1answer
20 views

How does web3 handle new longest chains?

I have a Dapp which subscribes to events using web3. I'm wondering how I can detect that the longest chain has changed or rather how I can make sure the events that I've received are canonical. The ...
0
votes
2answers
15 views

Mining with additional data

i'm a beginner in using blockchain. Based on my knowledge, there are two ways blocks are created, mining and sending transactions. As there is an explanation to input additional data while sending a ...
1
vote
1answer
16 views

how to build Dapp for Android using react-native

I have a ethereum Dapp for web application and have metamask extension installed in my chrome browser to make transactions. Now i want the same application to be developed in android using react-...
0
votes
1answer
21 views

Read and write products using solidity

I am new to Solidity, trying to store a product in the purchaser wallet and retrieve the information from the owner wallet. I have some ideas but didn't know which one will be best. To store an ...
1
vote
1answer
21 views

What is words in uint256?

Let's take two variable: uint256 public smalldata = 50000; uint256 public data = 500 * (10**6) * 10**18; The first on prints: BN { negative: 0, words: [ 50000, <1 empty item> ], ...
0
votes
1answer
13 views

Miner not updated to Muir Glacier. Coins now in Ice-Age-Chain(?)

What happens if a miner processes my transaction that has not updated to Muir Glacier? Is it possible that I loose coins because the miner is still on the old chain so that the coins are now on the ...
0
votes
0answers
18 views

Cannot set a proxy implementation to a non-contract address [closed]

I have deployed contracts; FiatTokenV1 https://ropsten.etherscan.io/address/0x612a2a33e4d34eb00d59f82a37918d88d8e332ec deployed proxy with implementation address=...
1
vote
2answers
19 views

My ether was automatically sent to different address without my permission

My ethereum account is 0xfAd956B56be1298ee8ec1950cc305B46268d926f (generated by metamask) and the moment friend of mine sent me an ether, it was automatically directed to another account. This is the ...
2
votes
0answers
27 views

How to reduce block time for existing ethreum blockchain network?

I had deployed my private blockchain network back in 2018-08-12 16:12:48 +0600 (1 year, 167 days ago). Since then it is working. At that time the block time was 20-30 seconds which was acceptable for ...
0
votes
1answer
38 views

Problem with running truffle code with node.js

I am trying to run truffle code with Node.JS in the backend to deploy contracts. I want to be able to do this interactively and I am intending to use the Express Library to interact with the Node ...
1
vote
1answer
60 views

Why does not Ethereum allow removing all entries from a mapping, like clear() in Python

Is it common that dictionaries like mapping(uint => uint) foo; cannot be cleared with something like clear()? What is the reason deleting mappings aren't allowed in Ethereum?
0
votes
0answers
19 views

Blockchain job statisics [closed]

My advisor asked me to prepare a presentation for undergraduate students about bitcoin and blockchains. I want to impress the students by this technology. I am looking for statistics/charts/reports/ ...
0
votes
1answer
22 views

How to convert to 8 digits in etherum

I have a token that has 8 digits, so the output is 4762575931 instead of 47.62575.. How can i change this so this works on UI and for metamask input? I know there is the function to wei but this is ...
0
votes
0answers
16 views

Any opensource (github) ETH based scriptural transaction + data scripts available [closed]

I am looking for a 'github' or open-sourced script/framework so that I can scripturally automate an eth transaction from 'a' to 'b' that will include 'data' within the transaction. Like a smart-...
0
votes
0answers
19 views

Script for opening a geth console for a node and running commands in it

I am trying to create a script running a couple of geth nodes, open a console for each of them and run a couple of commands such as admin.addPeer() and miner.start(). I read that i can use --exec to ...
0
votes
0answers
8 views

How to revert chain to previous block in Parity 2.4.x?

Parity 2.4.x has the ability to revert to a particular block. Has anyone used this feature? Can you share an example? https://github.com/paritytech/parity-ethereum/pull/9782
1
vote
1answer
17 views

Mocha assertions not returning correctly on assert.equal with BN

Is this an issue with deep matching/object identity? AssertionError: expected <BN: 204fce5e3e25026110000000> to equal <BN: 204fce5e3e25026110000000> It seems strange that chai.should ...
0
votes
1answer
28 views

How can I turn this into a human readable output? [closed]

I have this buy function but the output gives me a transaction Nr. or whatever this is async function buy() { var a = document.getElementById("amount").value; var accounts= await web3.eth....
0
votes
0answers
7 views

Web3.py Could not transact with/call contract function, is contract deployed correctly and chain synced?

I am trying to call a contract function deployed in Ganache. I am pretty sure the contract is deployed because I can transact() and work with other functions. But when I call() it, I get this error: ...
1
vote
1answer
34 views

How can I get a private key from a mnemonic phrase?

I want to convert a 24 words length seed phrase into a private key using web3.
0
votes
0answers
22 views

Oraclize ( provable) updates the value only one time

I'm trying to write a smart contract that gives me the current timestamp. The very important part is that i want this to happen locally, not on test networks. After some research, i installed ethereum-...
0
votes
2answers
31 views

Why in solidity 0.6 these functions are no more free? [duplicate]

Try this code pragma solidity >=0.5.0 <0.6.0; contract test05 { address payable public admin = msg.sender; function() payable external {} function getBalance() public view ...
1
vote
1answer
20 views

Understanding Transaction in Bitcoin [closed]

I read a lecture about Bitcoin Blockchain. As shown in the slide below, a user Alice sends a transaction to BoB. Alice should 1-) Hash(Hash of the transaction of the coin || Bob Public Key || Alice ...
1
vote
1answer
20 views

Solidity error message on compilation (DeclarationError: Identifier not found or not unique. using Address for address;)

I'm trying to compile a code for a crowdsale contract (Timed and with allowance) from openzeppelin library that is based on a deployed token. However during compilation on remix i get a syntax error ...
0
votes
2answers
31 views

Ho can a server act for third party?

I will try to explain my idea. Our server receive data to save from different servers, we call it S1, S2 and S3. Our server uses a node script with web3.js to call function over a contract. Actually ...
0
votes
1answer
18 views

Why do we use `serialize` function of `ethereumjs-tx` package before broadcasting a transaction

I just want to know the purpose/functionality of serialize function which we use before broadcasting a transaction: const serializedTransaction = tx.serialize() const raw = '0x' + ...
0
votes
1answer
15 views

Are there any API to get real money value equivalent of a transaction?

I know that etherscan shows the total cost of a transaction both in eth and in US dollars. Is there any api of any kind to be able to get instant value of eth when I send a transaction?
0
votes
0answers
13 views

Private Blockchain Chain Spec Sanity Check Please

A private blockchain running for two years runs find on Parity 2.3.9. When upgrading a node to 2.4, sync stops. Peers are still strong (25) but block import repeats at Block X where Block X is the ...
0
votes
2answers
19 views

ERC20 Mixer to transfer fund privatly

I am working on idea to mix erc20 token from one account to many account. i have seen many example but all example has some limitation. like you can mix fixed amount. Sender can mix one ...
0
votes
1answer
23 views

eth.getBalance(eth.accounts[0]) Shows me 0 balance though my syncing is still Running [duplicate]

I am using geth on windows with 1.9.10 version. I used geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net" command for launch my geth. I am on the Rinkeby testnet, i already transfer 3 ...
0
votes
1answer
8 views

how to send parameters to smart contract while deploying using metamask

I am trying to deploy a smart contract using BrowserSolc and Metamask. and deployed successfully when the contract doesn't have constructor parameters but now I am trying to deploy with the ...
0
votes
0answers
11 views

Contract is not deploying properly on Geth private network using web3j SDK

I am new to Ethereum. I have created private blockchain using Geth on my local and trying to deploy my smart contract using java web3j SDK. I am able to deploy my contract using java and getting ...
0
votes
1answer
17 views

Getting revert error on transfer ether to wallet address

hi i m calculate the ether value with token price and quantity of tokens and than sending calculated ether value to seller account but i am getting revert error on remix at escrow.originatorAddress....
0
votes
1answer
17 views

Can I use other tokens in loom network (sidechains)? How does loom network handles it?

How to receive other tokens in the smart contract deployed in loom and keep it in escrow?, this is the code. pragma solidity ^0.5.0; //import ERC20 functionality ... contract Example { ...

15 30 50 per page