All Questions

0
votes
0answers
2 views

How to connect frontend to a node

I created 2 nodes . I connect an accounts to metamask. I connect the smart contract with remix on the node. Now i am trying to connect frontend with the smart contract with web3. In the index.html i ...
0
votes
0answers
4 views

How to send data to transactions - ethers.js

I want to send a vote to every transaction. As transactions only happen when the required votes are met and i want to store the vote count to specific that transaction. i am using ethers.js my ...
0
votes
1answer
9 views

What is the difference between web3 and window.web3

I'm very used to using web3 = new Web3(web3.currentProvider) and I saw here that MetaMask sample code is using window.web3 = new Web3(web3.currentProvider) What's the difference between using and not ...
1
vote
1answer
7 views

How to sign a transaction locally

Is there a way in web3.py to create a wallet of accounts similar to web3.js to sign the transactions locally without building a raw transaction? web3.js code: var provider = new Web3.providers....
0
votes
0answers
5 views

Oraclize : Calling more than one API independently

There are 2 API 's which has to be called in different time delays recursively. For example : API_1 = 20 mins delay and API_2 = 24 hr delay. How can we call the above 2 API's independently based on ...
0
votes
0answers
2 views

Azure Custom genesis.json

Can any one tell me how to deploy Custom genesis.json file on Microsoft Azure ? I tried exploring all option but did not get nay option to upload custom genesis file.
1
vote
0answers
6 views

Oraclize ethereum bridge : Notifying __callback tx error to frontend

I have called API dynamically using Oraclize with the delay of 10 minutes. The code is shown below and it works well. uint256 constant DELAY = 60*10; event Log(string result); function ...
0
votes
1answer
5 views

Is possible for a contract to manage and hold different address and its balance for different erc20 tokens?

Imagine an exchange contract to store and handle different accounts for different buyers and sellers, it is possible for a contract to manage and hold different address and its balance for different ...
0
votes
1answer
13 views

How event in ethereum actually works?

I'm currently working with Ethereum and smart contracts. I see that a contract can define events and emit them. Each event defines no target, so I assume it will be broadcast. But I wonder how to ...
1
vote
2answers
18 views

Where is the length of an array located in terms of memory layout?

For example, given the following cases: uint[3] memory arr; uint[] memory arr = new uint[](3); Suppose I try to access arr from within an assembly block (using mload, for example). Where (...
0
votes
1answer
15 views

setting array in Solidity

consider the following solidity pseudo-code: contract Test{ bytes ar; function set_a(bytes val) external{ //(1) ar = val; //(2) for (uint i=0;i < val.length;i++) ar[i] = val[i]; } } ...
0
votes
0answers
4 views

How to start a node on private ethereum chain using “geth --config config.toml”?

I set up a chique poa ethereum private chain. the node can start to work using the command below: geth --networkid 123456 --rpc --rpcport "8545" --rpcaddr 0.0.0.0 --rpccorsdomain "*" --datadir ./...
0
votes
0answers
7 views

How to print different type message of geth console nto different log file?

For example, the normal information will be written into standard output or logfile1. the error information will be written into file2. Thanks.
0
votes
1answer
12 views

remix test inside a ubuntu environment

Im trying to make some test using the remix test library. I create a VM with a Ubuntu Server 18.04 I update the system to latest version and I install npm and node. I generate a folder with the ...
0
votes
1answer
27 views

The EVM throws an error “invalid opcode 0x1c”

I have written a simple smart contract that allows to store a string, and I'am trying to use go-ethereum(which is similar to web3j). When I execute a transaction, I have this error VM returned ...
0
votes
2answers
17 views

Testing sha256(abi.encodePacked(_argument))

When trying to test a smart contract that uses sha256(abi.encodePacked(_myargument)) I don't get the same hash on truffle ! I tried both web3.utils.keccak256('_myargument') web3.utils.sha3('...
1
vote
0answers
9 views

The bootnode is not working properly

I am running a private ethereum network using geth. I started the bootnode first following the documentation and ran 5 different nodes on the same machine with same genesis file on same network with ...
0
votes
2answers
14 views

Can't get MetaMask wallet address on Firefox but Chrome is fine

I'm trying to get the current wallet address of MetaMask on my Firefox 67 but I keep getting nothing (empty array), except it says my MetMask is locked. But on Chrome 74 it works. FYI, my MetaMask is ...
0
votes
0answers
21 views

Migrations ran out of gas

I have unboxed pet-shop. Then inside the contracts folder, I made a file Election.sol which has the code - pragma solidity ^0.5.8; contract Election{ string public candidate; constructor() ...
2
votes
2answers
142 views

What's the difference between Truffle Migrations and ZeppelinOS upgradeable contracts?

It was my understanding that Truffle migrations will move updated contracts to new addresses. As a developer, you can use this feature to update already deployed contracts with new code. ZeppelinOS ...
0
votes
0answers
11 views

JVM waits for some timeout every time when I load a Smart Contract using Web3j In Java

Initially I had a problem with the Web3j object, but after explicitly calling its shutdown method everything works fine (JVM quits immediately, so my application closes). The problem occurs when I ...
1
vote
1answer
16 views

Migrate contract from testnet to mainnet

What is the safest way to migrate a contracted deployed in a testnet (Rinkeby) to mainnet? I can change the configuration of my truffle project and read the code from my git repository, but is there ...
0
votes
2answers
21 views

Do I need to include erc20 standared function in all smart contract?

erc20 token standard functions are only important for creating new tokens, or for all, suppose a smart contract is only intended to transfer token, should it contain those standard erc20 functions or ...
0
votes
1answer
24 views

Deploy dapp on private blockchain network

i have create a private network with 2 nodes. I have connect an account with metamask from my private network and i have created a full dapp ( contract,front-end). Now i want to deploy the whole dapp ...
1
vote
1answer
34 views

Is it possible for send() in Solidity to fail if value is sent to a valid external account?

I want to use something like the following as a fallback for failed transfers: if (!recipientAddress.send(amount)) { ownerBalance += amount; } After reading about using transfer versus send, it ...
1
vote
0answers
12 views

What is the scalability limit for POA Ethereum (number of nodes)?

Tried to find any benchmarks what is the maximum number of nodes for Ethereum PoA network. When network latency becomes crucial? Looking for any sources / empirical benchmarks.
0
votes
1answer
15 views

Is Smart Contract of any ERC20 token is always available publicly

Is Smart Contract of any ERC20 token is always available publicly. If not complete, then what things are generally available,(for eg, except some sensitive information) And, if not any of them are ...
0
votes
0answers
8 views

Do i need to create Checksum in blockchain? [on hold]

I'm trying to develop blockchain application, since it is newly developed do i need to create my own checksum algorithm ?
-1
votes
1answer
24 views

Factorial contract errors in version 0.5.1

This factorial contract is worked in 0.4.24 version, there were warnings, but it is raising errors in version 0.5.1. How to solve the problem? pragma solidity 0.5.1; contract factorial{ uint ...
0
votes
0answers
19 views

Which is better ? Aztec or EY Nightfall?

I want to make private transactions in a public blockchain and I came across the terms Aztec and Nightfall. Should I use Aztec or Nightfall ?
0
votes
0answers
11 views

How do I generate a TrustedCheckpoint(CHT) on my private chain?

I saw this link, but still don't know how to get CHTRoot and BloomRoot, only know that SectionHead is block[(SectionIndex+1)*32768-1].headhash https://github.com/ethereum/devp2p/blob/master/caps/les....
1
vote
1answer
30 views

how can I use takeOwnership function?

currently, I'm using openzeppelin. I can't find takeOwnership function in lately ERC721 interface. takeOwnership function deprecated? (I cant' find any document) so, how can I do that like ...
0
votes
0answers
7 views

Geth stuck on “Head state missing, repairing chain”

Geth crashed on lack of disk space, and now is stuck on "Head state missing, repairing chain" on a POA chain. Max verbosity doesn't give anything, nothing, nada, and because it has not recovered, ...
0
votes
0answers
30 views

all web3 call methods returns null

I create my contract with the following code: pragma solidity ^0.5.0; contract Coin { function sayHello() public view returns(bytes32) { return "Hello"; } } truffle-config: module....
0
votes
0answers
14 views

storing ERC20 inside of Non-fungible tokens?

Is it possible to store value in the form of ERC-20 tokens inside of non-fungible tokens such as ERC-721? If so, could someone showcase how through an example?
1
vote
0answers
36 views

Error while importing Libp2p package in blockchain

I have installed some js-libp2p's packages on my Ethereum Blockchain-ipfs project and I wrote some codes like below. const TCP = require('libp2p-tcp'); const MulticastDNS = require('libp2p-mdns'); ...
0
votes
1answer
20 views

I want to create a web application like MyEtherWallet

I want to create a web application like MyEtherWallet. In my web application, I make wallets but I do not store them. In a web application I created, I would like to read the key file stored on the ...
1
vote
2answers
73 views

How can I peek into the stack using inline assembly?

I am specifically interested in calling a function whose return-type is unknown to me. More precisely: The contract which owns the function has had several versions over time My contract may call ...
-2
votes
0answers
16 views

how to solve this error

> (node:23560) UnhandledPromiseRejectionWarning: ReferenceError: > ethereum is not defined > at connector.start.then (C:\Users\Vishal\Desktop\metamask\metamask.js:12:3) > at ...
1
vote
1answer
15 views

Is there a token standard that allow for future minting and burning of tokens?

I am interested in an ethereum token with the functionality for an operator to mint new supply at any time. It would also be nice if the operator could burn supply explicitly rather than sending to an ...
0
votes
0answers
12 views

Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window'

let web3Provider = web3.currentProvider; let ethersProvider = new ethers.providers.Web3Provider(web3Provider); Using the web3 current provider for creating the ethers provider causes a uncaught DOM ...
0
votes
1answer
23 views

How to connect a dapp on private ethereum network

I created a private ethereum network with 3 nodes kai i have also created a dapp. How i can connect my dapp with my private network? Thank you!
0
votes
0answers
12 views

Wallet Library Contract code for sending Ether

I got the following code at: Securify: Practical Security Analysis of Smart Contracts contract Wallet { // fixed address of the wallet library address constant walletLibrary = ...; // ...
0
votes
0answers
11 views

Relationship between fault tolerance and network latency

I'm currently studying Ethereum's PoS and a sentence on the relationship between fault tolerance and network delays caught my attention in the Proof of Stake FAQ. Quoting Vitalik: In this model, ...
0
votes
1answer
19 views

Am I hashing the data in the file itself, or just the reference?

I am attempting to create an app where I upload a file to a website and then I submit a hash of that file onto Ethereum. I am unsure whether I am hashing the actual file below or just the reference to ...
0
votes
1answer
10 views

How to get blocks from which an adress has taken coins&

I need to undeerstand how to find out from which blocks come coins that are currently stored at somee adress.Will be pleased to hear any suggestions.
1
vote
2answers
67 views

Syntax Error with 'if'

I am trying to compile the following program: pragma solidity ^0.5.1; contract MKotET1_1{ address payable king; uint public claimPrice = 100; function calculateCompensation() public ...
1
vote
1answer
13 views

call: Warning: Unused local variable

I am trying to compile the following code: pragma solidity ^0.5.1; contract MKotET1_1{ address payable king; uint public claimPrice = 100; function calculateCompensation() public returns(uint)...
0
votes
1answer
13 views

Unexpected identifier when I try and import Web3

In my javascript file, I get an unexpected identifier when I run the following line of code. import Web3 from 'web3'; Why is that?
0
votes
0answers
20 views

Time in blockchain and HTML

I'm trying to get time once data is submitted off-chain, since only way to get on-chain is via now to get the block time. Off-chain I'm using "document.getElementById("demo").innerHTML = Date()" to ...

15 30 50 per page