All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
1 view

Trying to send ERC20 token with Javascript button without success

I am trying to send an ERC20 token with the following code via web3.js. It was working until a week ago and then it stopped. Am I doing something wrong? Upon clicking it no longer interacts with ...
0
votes
0answers
6 views

Is there any example of a drizzle-react dapp implementation that uses render props?

Render props were added after React 16.3 and the github readme for drizzle-react suggests to use them. The problem for is that there is no updated documentation (other then the small example in the ...
0
votes
0answers
7 views

getPastEvents undefined(please help)

I had asked this question before. I looked carefully at the exchange section, which I advised, and I think there is no problem with the exchange section. At least in my opinion there is no problem and ...
0
votes
0answers
13 views

solidity - Send token without using transfer function

function purchaseWithToken(uint256 amount) public { require(amount > 0 , "Purchase require amount > 0"); require(_balances[msg.sender] >= amount , "amount not enough"); _balances[...
0
votes
1answer
11 views

How a consensus algorithm is implemented in a private Blockchain network ( ethereum )?

How to implement a new custom consensus algorithm in a network.
0
votes
0answers
7 views

How Proof-Of-Learning can be implemented?

Seen a paper on Proof-Of-Learning and wanted to know-how the consensus works and how to implement it in ethereum?
0
votes
1answer
8 views

Can block validation be done using machine Learning Algorithms?

I am looking for a new era of products that leverages the potential of Machine Learning and the blockchain, Thinking of different aspects of Blockchain which can be improved with the help of machine ...
0
votes
0answers
8 views

How can a smart contract payable based function returns value against any purchase

I am trying to get a return value from the payable function, the idea is a user must pay the fees and in return, he will get his special code. My JS test code is as follow it('get special code ...
0
votes
1answer
8 views

How to set constructor parameters before deploying in remix?

I don’t understand how it works. I created a contract with a constructor with parameters. But I don’t understand where to pass these parameters to the constructor. Or I need to set params after ...
0
votes
0answers
8 views

How to have ecrecover return nothing ? I means which value for malformed input?

I have a contract where the hash value is also the key to unlock the money. As the full ecrecover parameters are fetched from transaction parameters, and it was compiled in 2016, it is vulnerable to ...
0
votes
1answer
19 views

How can I interaction to a contract by address from another contract?

I have to access methods of one contract from another contract body. How can I realize that using just a address of first contract? contract KittyShelter{ address KittenRegistry; //Here, ...
0
votes
2answers
14 views

Create fastest possible localhost Ethereum test net

Is there an Ethereum test blockchain (similar to Ganache) which prioritises calculating transactions and creating a local blockchain 'db' as quickly as possible? Requirements: - Calculate ...
1
vote
0answers
14 views

Is there any way to extract transactions in uncles?

As stated in the wiki: Note: An uncle doesn't contain individual transactions. I would still like to extract transactions from uncle blocks. Is there any method available for doing so?
0
votes
0answers
13 views

Can a factory-contract access/read/modify variables in generated child-contracts?

at the moment I am experimenting with the factory/child-logic in solidity. With my factory contract I am able to create child contracts in which an auction is executed. Now I want to return a variable ...
0
votes
0answers
16 views

PIVX fork CryptoDezire Coin SendRawTransaction not working

A CDZC coin basically fork of PIVX . I am trying to send coin via rpc calls. Successfuly created RawTxn, SignRawTxn but unable to SendRawTxn. `await rpc.listunspent().then(async r => { ...
0
votes
0answers
5 views

How to save as g6 using graphs.nauty_geng in Sage?

I am trying to get Sage to generate all graphs with 7. I typed in the following: g7=[g for g in graphs.nauty_geng('7') ] I’d like to save as g6 data typeI file. How to do ? I want to use the g6 ...
0
votes
0answers
13 views

Is it normal that the last transactions don’t appear on Etherscan?

Last block with latest transaction was mined 4 hours ago. Of course, other explorers can see the latest ones but I need the Etherscan feature of accessing the details storage change of transactions. ...
1
vote
1answer
17 views

Creating a contract instance

Is it generally better to define a contract instance once, then pass it through your components like... class Parent extends React.Component{ constructor(props){ super(props); ...
0
votes
0answers
19 views

Function Call when Sender Must Be Certain Address

I have a contract on Ropsten, and when I do this is python, I get a result: result = contract.functions.getLastUpdateTime(0).call() So I know the abi is there, the address, etc. There's another ...
1
vote
0answers
6 views

How to tell if `geth` connected to EVM One?

I'm using the EVM One back-end with ewasm/geth according to the following instructions. Geth seems to be starting up as usual with the following command: geth --vm.evm=./libevmone.dylib How can I ...
0
votes
2answers
10 views

How to set a transaction timeout in txpool properly?

I want to limit transaction pending time to 5 seconds, after that the transaction considered as failed; does --txpool.lifetime solve the problem ?
0
votes
0answers
14 views

TypeError: market.FileViewed is not a function while trying to watch event

I want to watch for fileViewed event and it throws TypeError: market.FileViewed is not a function in marketplace.FileViewed{ ^ My solidity contract: pragma solidity ^0.5.0; contract ...
0
votes
0answers
14 views

cloning div container number of deployed child contracts time and put their data inside div container

Sorry for the silly question. I have a div container "product-card" , I want to loop the number of my deployed smart contracts time. every time when I loop I want to clone this div container and ...
0
votes
1answer
14 views

Giving a big nonce in transaction doesn't return anything?

When we put a low nonce in transaction options we got "nonce too low", but when a put a big nonce (bigger then transaction count) we got anything why ?
0
votes
0answers
8 views

How can I change the text message on connection request window of metamask?

I want to change the message in connection request window using web3js. I have attached screenshot here. kindly check it.
0
votes
0answers
6 views

hwo to identifie error from transaction error object?

is it possible to know what is the reason of transaction error from "error" object (nonce, insufficient fund ..) is there status or something to test using it ? Geth error message is generic, I ...
0
votes
1answer
10 views

How do Miner choose transactions for a block?

i am wondering how a Miner chooses the transactions, he want to mine inside a block. For example, a Miner has got the Transactions T1 and T2 at the moment he starts a new mining work. This Miner is ...
0
votes
1answer
10 views

Quorum permissioned network

How can I permission a quorum network? Imagine I have 3 nodes in my network and I install another node in my friends house. How can I prevent my friend add more nodes to my quorum network? thanks
0
votes
2answers
27 views

solidity - How to detect an ERC token has just transferred money to my contract

I am developing an application that automatically converts eth, usdt ... to my token when they transfer money to my contract address. With eth, I can do it, but how to detect other erc tokens, ...
0
votes
0answers
14 views

Parity Aura - Error: Transaction has been reverted by the EVM

I run the following code against two private blockchains, parity-aura and geth-clique. Why does the parity transaction revert and why does it use 6,000,000gas when it should actually only use about ...
0
votes
1answer
6 views

truffle compile/migrate gives error: “ParserError: Expected pragma, import directive or contract/interface/library definition.”

The tutorial I'm following created a 2_Migrations.sol with the following: const Token = artifacts.require("Token"); module exports = function(deployer) { deployer deploy(Token); }; "Truffle ...
0
votes
1answer
20 views

Could I implement a kill switch in my solidity program?

I was wondering if there was a way to put a killswitch into my solidity code? I am using v0.4.21+commit.dfe3193c Thanks a bunch!
0
votes
1answer
6 views

How estimate GAS from a contract call with Web3j

I'm trying to estimate gas cost of a contract call, i need to send a string to a contract, but i need to see if i overtook the GAS limit. I'm trying like this: Transaction t = Transaction....
0
votes
0answers
30 views

Solidity bytecode not generated despite no errors

When does a compiler fail to generate bytecode for solidity? The code compiles entirely but both remix and solc js give proper abi but empty bytecode. The contract imports ERC721. Solidity contract: ...
0
votes
1answer
19 views

Why is my code calculating incorrectly, it feels right to me?

Why does this keep returning 0? And yes, it is above the claimtime. It does it for every address. I don't know what's wrong? function ViewDividendOwed(address _addr) public view returns (uint256) { ...
2
votes
0answers
11 views

Why is it required to know the function selector in a smart contract to call the function? [duplicate]

I understand what a function selector is and how it is computed: The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order ...
0
votes
0answers
9 views

Geth error: Genesis not found in chain - error on the worker node!

Good afternoon. After restarting the server when trying to run get I get an error. Start command: geth --rpc --rpcport 8545 --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal" --cache 8192 --...
0
votes
2answers
62 views
+50

How to send ETH to address(0) from msg.sender address using multiple token's contracts, with Solidity 5.x?

I need the safest way for an user to send any amount of Ethereum to address(0). The amount is calculated by the contract, and there is no limit (assuming there is enough funds). All the code I could ...
0
votes
0answers
33 views

erc20 transfer SafeMath: subtraction overflow?

I am trying to transfer a erc20 token. const data = contract.methods.transfer(recipient, amount).encodeABI(); const rawTx = { from: sender, nonce: '0x' + count.toString(16), ...
0
votes
0answers
16 views

Ethereum payment processor Nodejs

I'm working on a web project where I need to have the ability to accept crypto payments. Implementing bitcoin was fairly easy as there were api's whom allowed me to directly subscribe to a specific ...
0
votes
0answers
11 views

How can I make geth to mine just pending transactions and no additional coins?

Since on my private test newtork based on go-ethereum (geth) I want only the miner thread to start when there are pending transactions, I am using the following script: var mining_threads = 1 ...
1
vote
1answer
35 views

How do I burn the exact ETH gas amount within a Solidity function?

What I am trying to do is simply increase the gas costs of running a solidity function, making sure that the right amount of gwei is spent/burned. Any good, simple, and a clean way of doing this ? -...
0
votes
0answers
14 views

solidity - how return array address

contract Referral is ERC20 { using SafeMath for uint; uint8 constant MAX_REFER_DEPTH = 3; uint8 constant MAX_REFEREE_BONUS_LEVEL = 3; struct Account { address payable referrer; uint ...
0
votes
0answers
9 views

Characterization of behavior on the network

I'm starting a new research using characterization and would like some ideas of interesting topics over the Ethereum network that can be achieved by looking at the blockchain data itself. Any ideas ...
0
votes
0answers
7 views

Why is geth RPC endpoint binding with all the interfaces?

I wish to run a private Ethereum network using geth. The machine I am running geth on is connected to Internet. geth is launched using the following command line: geth --datadir geth-data-dir --...
0
votes
1answer
17 views

Transaction propagation

I am wondering how transactions are propagaded in an Ethereum network. Assuming a Miner recieves an transaction, how does he deal with it. Does he immediatly send it to his peers, or does he collect ...
0
votes
0answers
4 views

Convert Hashpower to target boundary in Golang

For example, if you give a Phoenix Miner 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffas a boundary, Phoenix Miner understands that to be 4.29 Ghs (4290000000) As shown in ...
0
votes
1answer
22 views

How to change push() method to simple code?

I have this code but it's static and I wanna change it dynamically. function addCandidates(){ if( own == 1 ){ candidate[0].candidate_ID[0] = 1; candidate[0].candidate_ID[1] = 2; ...
0
votes
0answers
8 views

what configuration I need to set at parity if I using web3js?

What is the setting at Parity private server, if I want to sent signed transaction? const sender = '0x...'; const senderPrivateKey = '...'; const recipient = '0x..'; const ...
0
votes
1answer
14 views

ethereum node to setup with min space

i want to setup an ethereum node for my website to use. What is the min space I need? To save space do I need to use light node? Or even Better idea? How much space I need for light node or full node? ...

15 30 50 per page