All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
17 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
22 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
21 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
1answer
30 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
18 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
20 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 => { ...
1
vote
1answer
21 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); ...
1
vote
1answer
35 views

web3py - 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
7 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
19 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
1answer
29 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
15 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
1answer
16 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
8 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
18 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
11 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
34 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
1answer
38 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
19 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
2answers
29 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
29 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
40 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
15 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
10 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
113 views

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
49 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
26 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
14 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
2answers
49 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
8 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
29 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
6 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
29 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
1answer
15 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? ...
0
votes
0answers
24 views

Recursive binary search function (in solidity) not working

This is recursive binary search function in solidity. I run the SortTESTER function to populate an array with values. Then I run the SortUserData function to check values which passes the values to ...
1
vote
2answers
29 views

How to decode error response from contact

When calling a contract function that I expect to fail by invoking revert, I receive the following JSON-RPC response: { "jsonrpc": "2.0", "id": 1, "result": "...
0
votes
0answers
18 views

Why is my Contract interaction cost so high?

When interacting with the UI of my application, it says the cost of doing this interaction through metamask is 400 ether. I am using Ganache for testing which only allows you to have 100 ether. I am ...
0
votes
2answers
23 views

Can an Ethereum token be bound or pegged to the value of the gold? [closed]

Could a token be built in ethereum that its price would be bound or pegged to lets say .00006 times the price of an once of gold?
0
votes
0answers
30 views

How to connect Remix desktop to connect to MetaMask?

I downloaded the desktop version of Remix, and am trying to connect it to the main network. I can do this in the web version of Remix easily, opening up MetaMask on my browser. However, in the desktop ...
1
vote
2answers
30 views

How do i use .send() to fire methods of my smartcontract?

I have looked alot for information about this and lastly i turn myself to here. I've written a smartcontract and deployed it to Ropsten . I am then using web3.js to interact with my smartcontract, i ...
0
votes
1answer
16 views

Tokens are not being transferred with web3js

i have been using following code for transferring tokens from wallet to another with the use of web3js. async Transfer(eth_address, amount){ let tokenAddress = "...
0
votes
1answer
18 views

Where does contract’s call failure behavior is definied in the yellow paper?

If a contract’s call succeeds then 0x1 is pushed on the stack and 0x0 otherwise. Where is this behavior defined in the yellow paper ? Also, are there cases were sending ether isn’t reverted in ...
1
vote
1answer
50 views

ipfs.infura.io for IPFS gateway and pinning

I'm using Infura API for initializing IPFS. IPFS uses garbage collector to clean 2 weeks old unpinned data in public gateway. So, if I'll pin my hash is it possible that IPFS will still delete my ...
1
vote
2answers
56 views

Recursive function in solidity?

I need to call a recursive function with if statements. Is this possible in Solidity? Please provide an example.
0
votes
1answer
23 views

Checking TokenBalance of other token contract

I try to simply check a users DAI token balance on Kovan testnet (ContractAddress: 0xC4375B7De8af5a38a93548eb8453a498222C4fF2) with the following code: pragma solidity ^0.4.16; contract ERC20 { ...
0
votes
1answer
21 views

Is there any chance to retrieve data on a database(sql) to a smart contract [duplicate]

I want to write a smart contract that gets id numbers as inputs and then retrieve data that are recorded in a database.Is there any specific database for that process.
0
votes
1answer
27 views

using account create in metamask with Nethereum

i have a doubt can i use an account created in metamask using nethereum? i tried this. var abi = @""; var addressContract = ""; var myAddress = "xxxxx"; var password = "password"; var managedAccount =...

15 30 50 per page