All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
9 views

How to import the Contract type from the web3.js library?

Here's how I can do that in ethers@4.0.47: import { Contract, ethers } from "ethers"; const contractInstance: Contract = new ethers.Contract(address, abi); But in web3.js@1.2.8 none of the ...
1
vote
0answers
35 views

Catch Internal Out of Gas Exception in Solidity Code

I ran this transaction which executed correctly, but one of the internal calls gave me back an out of gas error. I had a try/catch mechanism to let my code terminate silently (to set some really ...
1
vote
0answers
10 views

How does zocrates process zk-SNARK step by step?

I'm trying to understand my zokrates code and how it processes zk-SNARK step by step in accordance to this article. The article breaks down the zk-SNARK into three steps. A key generator, G, takes ...
0
votes
0answers
8 views

web3.js error ethjs-query gives out error in write contract functions

Hi I am getting error Error: [ethjs-query] while formatting inputs '[{"0":false}]' for method 'getTransactionReceipt' error: Error: [ethjs-format] hex string '[object Object]' must be an ...
0
votes
0answers
11 views

How to unlock eth account using web3?

Hi I'm trying to unlock an account using web3 but it returns empty error. When I use cli it returns true > personal.unlockAccount(eth.accounts[0]) Unlock account ...
0
votes
0answers
37 views

Howto send EOS from metamask [closed]

I have the same question as member cryptoclint has with on metamask public/private key pair registered EOS EOS in my Metamask there is only an ethereum address as the sending field of your ...
1
vote
1answer
17 views

How to get rid of large amounts of my own custom tokens?

Consider this hypothetical scenario: Let’s say I created an ERC20 token just for fun. I keep 1 billion of these tokens for myself. I list this token on a small exchange. And then by some miracle ...
0
votes
0answers
14 views

how to use erc721 token in real estate?

i want to know if i have a property like house and i want to sell it through smart contract using ERC721 token standard. This is the explanation... Register a property with its details like ...
0
votes
1answer
14 views

why mapping not returns “value”?

I am calling the function getPrice() with arguments tokenId but it returns 0, while i have assigned price = 1 ether, where is the problem in this code? pragma solidity ^0.6.7; import "./S5Implement....
0
votes
0answers
13 views

Can't call coinFlip() function the second time

The first time when i run this it runs fine but the second time when i call the coinFlip() function it shows gas estimation failed can someone tell me why it is happening. pragma solidity ^0.6.0; ...
1
vote
1answer
13 views

How do I find the ABI/JSON Interface for an ETH/ERC20 contract?

I sent TUSD to my Bittrex holdings to trade for other coins, but it never went into my account with Bittrex. They claim that I sent it to the wrong address. I am trying to recover these tokens so that ...
0
votes
2answers
18 views

Do I have to create a custom ERC20 to test transfers in Truffle?

I have a smart contract that escrows and transfers a specific ERC20 token to and from users (with their approval). I'm a bit confused as to how to test transfers of existing tokens. Do I have to copy+...
0
votes
1answer
9 views

Scalability of private chain with 0 block time

What could be some issues in scalability if a block time of 0 is set to a private ethereum blockchain? If I set it to zero, blocks will only be added to the blockchain every time there's a single ...
0
votes
1answer
17 views

ParserError: Expected ',' but got ';'

I`m trying compilate this code and getting Parse error pragma solidity ^0.6.0; contract ZooFactory { event NewZoo(uint zooId, string name, uint dna); uint dnaDigits = 24; uint ...
0
votes
0answers
14 views

We are creating a new decentralized synthetic cryptoasset codenamed XOR on Ethereum ecosystem. any suggestions will be helpfuls [closed]

We are creating a new decentralized synthetic cryptoasset codenamed XOR on Ethereum ecosystem. We call it a synthetic asset as it's a synthesis of BTC, ETH and major altcoins and USD stablecoins. XOR ...
0
votes
1answer
36 views

Ubuntu 18.04: Error during compilation using Truffle: How to install the updated version

I am working on Ubuntu 18.04. I have installed Truffle from the following site: Truffle for Linux I am trying to execute an application from the following site: Petshop Tutorial I am able to ...
0
votes
1answer
28 views

How to create payable contract solidity

contract Test { constructor() public payable { } } contract MyContract { constructor() public payable { Test test = new Test(); } } How do I pay the Test contract's ...
0
votes
0answers
9 views

generate DAG before mining process

I have a problem when i install a private ethereum node on my pc using powershell and before mining process I need to generate DAG . the problem at this process it take very long time .. 9 hours and ...
1
vote
1answer
23 views

How to decode a raw transaction in Python?

I have a raw_tx in hex format which I'm going to broadcast via eth_sendrawtransaction JSON-RPC method. I want to check this raw_tx by decoding it on fields: gas, gas_price, nonce, value, etc. Some ...
0
votes
0answers
12 views

What is a good wallet service for iOS applications

I am building an iOS app that rewards users with crypto tokens, just like Brave's BAT or Reddit's community points. I am trying to find a wallet service that I can integrate with my iOS app for users ...
0
votes
0answers
11 views

Drizzle problem: how to connect to infura direct when user has Metamask, but isn't connected?

I understand how to connect direct to infura if the user has no wallet at all (for displaying blockchain data when users don't have a wallet) the problem is that I don’t know how to connect to infura ...
0
votes
0answers
5 views

How safe to run Lighthouse without --auto-register vs. the effects of registering more than once?

Running a Lighthouse validator presents a message to strongly consider running --auto-register the first time. The documentation also states: The --auto-register flag registers your signing key ...
1
vote
1answer
7 views

Connecting to a data directory in a different machine

I have set up a ethereum private network and the data directory configured in the same machine. Is there anyway to create the data directory in a separate machine and connect the geth to that. The ...
0
votes
0answers
31 views

What is Ethereum? [closed]

The answer to a question of this kind depends on context, of course. So let us assume the person asking it is technophilic with a superficial knowledge of computer science. What is Ethereum? The ...
0
votes
1answer
17 views

Add a new user using smart contract

I am trying to make a smart contract which can add /delete and modify users in the smart contract. I have just written the code for adding the user but I am getting an error saying "revert The ...
4
votes
1answer
60 views

What fixed or float point math libraries are available in solidity?

Solidity doesn't have float or double variables. What solutions are there to handle the cases where we really have to represent numbers as percentages or fractions?
0
votes
1answer
41 views

What are the flaws of this example contract?

I am currently writing a paper/article on tokenization, in the beginning of which I introduce smart contracts. To this end, I present the following contract as an example: pragma solidity ^0.6.0; ...
1
vote
2answers
20 views

ERC20 contract not able to transfer large amount of tokens

I am building an ERC20 Token. I want to the decimals properly so that people can do transaction in deciamls also. So, I am trying to transfer 10^21 tokens from my address to another. Minted tokens : ...
1
vote
1answer
10 views

What is the name of the minor unit of USDT (Tether)? [closed]

Is there a name given to the smallest unit of USDT or Tether? For example: 1 Bitcoin = 100000000 satoshi 1 Ether = 1000000000000000000 wei 1 USDT = 1000000 ?? If there is no such name, I would ...
1
vote
1answer
15 views

Maximum totalSupply of an ERC-20 token? And is it different for any other ERC specifictiond?

uint256 This storage implies that it should give us a max totalSupply of 2^256 - 1. A HUGE number. Note: I only need to store integers, not fractional values for my application. Is this true? Is ...
0
votes
1answer
13 views

Boolean function is returning incorrect result [closed]

I am expecting true in tripAnalyzer function as it is meeting the requirement of studentCount and principleApproval but don't know why the function is always returning false. contract SchoolTrip { ...
0
votes
1answer
9 views

mnemonic.includes in not a function

I've been trying to compile my solidity smart contracts So I'd be able to deploy them on the Ropsten Test network when I run truffle compile I get this error : TypeError: mnemonic.includes is not a ...
0
votes
1answer
11 views

Where can I find compiler info to verify & publish an ERC-20 token on Etherscan when I didn't write the code?

I'm a developer working for a small startup with a standard ERC-20 token that we'd like to verify on Etherscan, but I wasn't the person who minted the tokens initially (that developer no longer works ...
0
votes
0answers
18 views

Create function with different prices [closed]

I'm coding a nft token, but I need them to have different prices. It is possible put all in one function. This is what I have and is working for me: function contribute1(string memory _name, ...
1
vote
0answers
9 views

Cannot query contract methods after upgrading to geth 1.9

We have been running a geth 1.8 based private PoA chain for a long time. We are trying to upgrade it to geth 1.9. After changing the command line arguments to reflect the new API and remove ...
2
votes
2answers
51 views

Can I split the eth-deposit for running a eth2.0-validator to multiple transactions

For running a validator one need to deposit 32ETH to a specific deposit-contract on the ETH1.0 chain. My question is, is it possible to split this deposit to multiple transactions (e.g. 4x8ETH)? ...
0
votes
1answer
25 views

eth.coinbase gives the wallet address which is not exist in the system

I'm facing a strange issue, when I execute eth.coinbase command on Geth, it gives me wallet address which is not present in the key directory. But that isn't in the genesis file I'm not sure how ...
0
votes
0answers
11 views

sending transaction giving an error of “unknown account” after some time interval in Geth

I have review kinda same questions on this site, however, the issue in my case is different hence I'm asking. I have setup three nodes for the private chain, and it's working fine. I can send ...
0
votes
1answer
14 views

how to send one transaction from multiples seed wallets? [duplicate]

I would like to know if there is posible to group 3 wallet balances derived from a seed phrase and send one tx. Example : The user received 1 ETH to address A, 1 ETH on address B, ETH on address C. ...
1
vote
1answer
19 views

derivation path for ethereum?

how are you doing! I would like to know what happens if from a ethereum seed I derive a wallet using BIP49, BIP84 derivation path and then send ethereum from another wallet which is BIP32 or BIP44, ...
1
vote
1answer
28 views

Is it possible to filter pendingTransactions?

To get a list of the pending transactions that my node is aware of I can easily call the eth_pendingTransactions jRPC call. This will give a big list of pending transactions, which all need parsing to ...
2
votes
0answers
17 views

Why does Ethereum use JSON-RPC and not gRPC?

I am fairly new to networking protocols especially JSON-RPC and gRPC as they are not nearly as common in web development as REST. I was reading around and seems like gRPC generally performs better. So ...
0
votes
1answer
12 views

How to call sha256 in assembly

I wanna compute sha256 in Solidity Assembly for hash of getting bytes slice.
0
votes
0answers
9 views

migrate error from new buffer(process.env)

I follow the book Ethereum from Gavin Wood and when i use truffle migrate --network ganache it gives me following error; TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type ...
0
votes
0answers
15 views

How does Ethash work technically? [closed]

Best explanation I found- Mining on Ethash involves fetching random data from the dataset (the DAG), computing some randomly selected transactions from any block, and then returning the hash of the ...
1
vote
1answer
21 views

How to save long textual data on blockchain? [closed]

I need to write blogs and save them on blockchain. What are efficient possibilities to store such data on blockchain? Thanks for reading the question, already appreciate your time.
0
votes
0answers
30 views

How to send an array of structs from web3js to solidity contract?

I am getting an error when passing (javascript array of objects) from web3js, To solidity function that takes (array of structs) as a parameter. could you help me? below is the code and the error /...
0
votes
1answer
24 views

Multiple transfers, one smart contract

I have the following function in my contract: function AcceptOffer() public payable { if ( msg.sender != InstanceOwner ) { revert("You are not the owner of this ...
2
votes
0answers
22 views

How to keep a Sidechain up to date with well known static singleton contracts?

it becomes more and more common in the Ethereum ecosystem to have contracts that only need to exist one time - and all other DApps/Contracts are interacting with this one contract instance. Here are ...
0
votes
1answer
14 views

How would a miner include my tokens merged mining function in blocks they mine?

So I have a merged mining token. How would a miner include my function in the blocks they mine? pragma version: v0.4.26+commit.4563c3fc.js Merged mining code: function mineTokenReward() { ...

15 30 50 per page