All Questions

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

Does the 10,000 refund apply to booleans too?

I understand from this thread that you're refunded up to 10,000 gas when setting a value to 0. Does this also apply to boolean values? That is, going from true to false?
2
votes
0answers
99 views

geth account creation Failed to enumerate USB devices

I'm trying to create a private Ethereum network on a Kubernetes cluster using ethereum/client-go docker image but getting bellow error while trying to create an account: ~/.ethereum # geth account ...
0
votes
1answer
27 views

What's the difference between ipfs.infura.io vs ipfs.io

When saving ipfs hash, i find that ipfs.infura.io is x10 faster than ipfs.io. If the public gateway (ipfs.io) has a negative impact on user experience due to its slowness, why people would use that ...
0
votes
2answers
21 views

Smart Contract Interfacing - Best Practices

what is a general rule of thumb for creating interfaces? Why would I want an interface i.e. IAugur.sol instead of the entire Augur.sol file? Can someone shed light on interface best practices and pros/...
0
votes
1answer
19 views

Failed to install Truffle on MacOS Mojave

I am currently really struggling in getting Truffle up and running. I am running MacOS Mojave and have Node (v.10.16.0) and NPM (6.9.0) and have tried npm install -g truffle and have gotten: ...
0
votes
1answer
11 views

What would web3.js respond with in this case?

I have a mapping to a struct in my contract mapping (uint=> Student) students; struct Student { bool passed; } Now I want to call a particular student with a particular ID to see if he has ...
0
votes
1answer
19 views

others accessing setApprovalForAll ERC721

While I was skimming through open zeppelin's ERC721BasicToken.sol I came across a problem. When setting the approval of a given operator function setApprovalForAll(address _to, bool _approved) ...
0
votes
1answer
10 views

ReferenceError: config is not defined [closed]

require("babel-register"); require("babel-polyfill"); require("dotenv"),config(); module.exports = { networks: { development: { host: "127.0.0.1", port: 7547, network_id: "*" ...
1
vote
1answer
13 views

Find keyfile of an account

I have several accounts in my Geth wallet. I need to locate the keystore file of a given account but there doesn't seem to be any connection between the keystore file names and the accounts. How do I ...
1
vote
1answer
40 views

No matching declaration found after argument-dependent lookup in remix IDE

I'm getting this error in remix: "TypeError: No matching declaration found after argument-dependent lookup. require(_spender.call.value(msg.value)(_data)); ^-----^ " function approveAndCall(...
0
votes
1answer
35 views

Question about inline assembly in Solidity

I've got this line of inline assembly code in a Solidity file and I'm trying to understand what some parameters do. assembly { success := call(sub(gas, 2000), 8, 0, add(input, 0x20), mul(...
0
votes
0answers
17 views

Alternative to Ethersweep

Im experimenting with the erc20 token. When trying to write contract on etherscan the Web3 connection just don't work, and I don't know why. But then I thought that perhaps Ethersweep could do ...
0
votes
1answer
18 views

How did cryotokitties create the image of the cats?

For cryptoKitties, the images of the cats are based on gene, for example, color, curve type etc. and the image of the cat will be created, how does the image created, it is by programming running ...
1
vote
1answer
27 views

adaptive vs. non-adaptive adversaries? Is there a precise, unique and general definition? (Updated)

In this Ethereum github page (Link to the page: https://github.com/ethereum/wiki/wiki/Sharding-FAQ#what-are-the-security-models-that-we-are-operating-under) there is a very brief definition of the ...
0
votes
0answers
53 views

How to send transactions to smart contract in batch?

I have this smart contract function: function addOneUser (User memory _user) public { bytes32 hash = keccak256(abi.encode(_user.name)); users[hash] = _user; } Using ...
0
votes
1answer
41 views

ERC721Enumeration: DeclarationError for tokenOfOwnerByIndex(address owner, uint256 index)

I am new to the smart contract and please let me know why I have the error shown below. I compiled with the command, "truffle compile". I did not make any particular edits to the original contract ...
0
votes
1answer
13 views

Commit-Reveal Sequence Design

Let's cook up a scenario to ease understanding: We have a group of 5 people (addresses) who must vote on a question. The people can only vote True or False i.e. a boolean. The result of the vote ...
0
votes
2answers
82 views

File import callback not supported import “./IERC20.sol”;

when I try to compile my contract I see errors like this : DemirelToken.sol https://eksiup.com/p/4z49413damc3 here's the code : pragma solidity ^0.5.0; import "node_modules/openzeppelin-...
1
vote
2answers
49 views

Analogue web3.eth.accounts.sign (from web3js) in web3py

There is a function web3.eth.accounts.sign in the implementation of web3js. But I cannot find the exact equivalent in web3py I don't see this. I found something similar to this — the signHash function ...
1
vote
2answers
58 views

Remix: 0x0 Transaction mined but execution failed due to construction

I have the following example smart contract, where I cannot deploy using remix into my private network using environment Web3 provider. The error I am getting is Transaction mined but execution failed ...
0
votes
1answer
20 views

How to send a transaction with large data ethereum?

I am trying to send an array of object (tuple) to smart contract. function addManyUsers (User [] memory _users) public { for (uint i = 0; i < _users.length; i++) { bytes32 ...
1
vote
1answer
19 views

How can I make new account by JSON-RPC of Go

I'd like to make new account by JSON-RPC.I've checked the wiki of Ethereum, however I could not find out how to do that. I've found call existed accounts, but it isn't what I want. eth_accounts ...
0
votes
3answers
62 views
+50

How to deploy Library contract separate from the main contract and link it

For deployment I am using remix. When I deploy Hello.sol the compiler typically merges SafeMath.sol as a part of the main contract (Hello.sol) and deploys. This adds up library and main contract's ...
0
votes
0answers
12 views

How does remix decode a contract response without the ABI?

Remix seems to be able to decode the output of a contract to a block of JSON without having the ABI (say I just specify the contract address). How is this achieved - I'm interested in doing something ...
0
votes
1answer
16 views

Get return data from sendSignedTransaction

I need access to data returned by function that also changes state. Example: I have a contract live on testnet with a function that creates and then returns a new ERC20 token. contract MyContract { ...
0
votes
1answer
23 views

How do you pause a Proxy-Logic pattern?

Suppose we have a Proxy contract that forwards to call to a Logic contract by using delegatecall. If we pause the Proxy, users will still be able to directly interact with the Logic contract. While ...
0
votes
0answers
11 views

Can anybody help me with protocol development?

I have seen a lot of resources for dApp development but I don't know how to start learning more about protocol development. I have read whitepapers, some articles and started reading go-ethereum's ...
0
votes
0answers
11 views

Question about BFT-based consensus mechanism

Besides PoA,PoW, I found BFT-based consensus algorithms are also widely used. what's its main advantage of them compared to clique PoA which also require no extensive computation as PoW? What's ...
0
votes
0answers
10 views

Dapp browser/extension compatibility

Warning: open-ended question coming... I’ve been developing a dapp using MetaMask. I understand that web3 is the critical cog that provides a degree of universality when having to deal with ...
0
votes
0answers
20 views

Ethereum, eth_getBalance always give 0 for the latest transaction on fast syncnode [duplicate]

I started syncing ethereum core on --syncmode fast on July 5th, 2019. As far as i know and read, fast mode will sync the latest blocks and transactions. Then yesterday, I did one transaction of X ...
0
votes
1answer
11 views

Does web3.eth.wallet.create set the newly created wallet file as the 'global' source of addresses for the web3 instance?

I'm playing about with web3js@1.0.0-beta.55 and I'm setting an HttpProvider on Ganache for my web3 instance: this.web3Instance = new Web3(new Web3.providers.HttpProvider(environment.ethereum.provider)...
0
votes
1answer
21 views

Uncaught TypeError: web3.eth.Contract is not a constructor

For whatever reason, when I attempt to set an instance of a contract in a javascript file, I get the following message in my console: Uncaught TypeError: web3.eth.Contract is not a constructor At ...
0
votes
0answers
14 views

web3j - getter for array of addresses

I have a contract which has a field registry which is an array of addresses, Also have a getter for this field: function getRegistry() view public returns (address[] memory){ return ...
0
votes
1answer
39 views

explanation of appending .selector in solidity smart contracts

I'm trying to understand what .selector means when appended to logic wrapped up inside of functions definitions. I've tried to read the section in soliditydocs, but it doesn't seem to answer my ...
0
votes
0answers
28 views

Geth returning balance 0 [duplicate]

I started my geth using fast sync first and then normal sync once it was almost synced. 'currentBlock' is not increasing since hour and 'highestBlock' keep on increasing. geth --testnet --rpc --cache=...
1
vote
0answers
12 views

estimateGas works on Truffle, but fails on geth

I'm trying to estimate the gas required for deploying a smart contract. It works fine in Truffle, but fails in Geth for some weird reason: truffle(develop)> await web3.eth.estimateGas({ data: '...
1
vote
1answer
42 views

Sending Tether USDT via RPC JSON API call

I'm trying to send Tether using JSON RPC API via 0xdac17f958d2ee523a2206206994597c13d831ec7 contract. I've tried to cases: From simple ETH wallet From ETH wallet, which has only USDT This is what ...
2
votes
1answer
38 views

Convert address to string after solidity 0.5.x

After solidity 0.5.x release none of conversions from address to string appear to be working. I've tested all of them on remix and got errors like converting bytes to uint or something like this. ...
0
votes
2answers
24 views

ERC721 exchange logic

I'm trying to allow NFT holders to sell their tokens by listing prices (ETH) and allow others to buy those listed tokens. I used openzeppelin and succesfully implemented and tested my token creation. ...
0
votes
0answers
24 views

The reasons behind using public/private and addresses?

I understand that we need a public/private key so anyone can sign a message and miners can verify the signature using the public key. But, In this Question Relationship between Ethereum Address and ...
0
votes
1answer
20 views

JSON RPC-HTTP API have any sort of rate limiting or throttling?

Is there any sort of rate limiting on the RPC-HTTP API? Trying to track down why my node (private chain) can only handle ~40 requests per/second. I am only load testing it with eth_blockNumber so they ...
1
vote
2answers
45 views

Avoid using “now”

I am using "now" to save the block timestamp details. But there is a warning to avoid its usage. If we need to avoid it what is the best alternative to it.
0
votes
1answer
24 views

How to use function modifier to control contract function access right?

I deployed a ERC20Mintable token in truffle environment(the source file is ERC20Mintable.sol). The mint function is declared with onlyMinter modifer: contract ERC20Mintable is ERC20, MinterRole { ...
0
votes
0answers
27 views

Error: types/values length mismatch

I'm following an Ethereum Dapp tutorial in Udemy. I seem to stumble upon an error somewhere early in the course. I was about to deploy my beginner's contract and test it with Mocha when the problem ...
0
votes
1answer
17 views

Why the function needs payable() in solidity?

In my solidity code, I am not using the global variable msg.* but still I get the error message in the function. Please explain why this function needs to be a Payable function The below snippet is ...
0
votes
0answers
52 views

getWeb3ClientVersion() returns null

I'm trying to create an android Dapp by using the web3j library. I'm using connection to a local private Ethereum blockchain. When I'm trying to display the Client version it returns null. This is the ...
0
votes
1answer
21 views

Create multiple tokens for a unique property

here is the idea: we assign a set of unique tokens to a company and then we allow people to buy some tokens and get partial ownership of that company. How can I achieve this? I was thinking of ...
0
votes
0answers
16 views

Geth Sync failed

I started to sync Ethereum using command geth --syncmode "fast" on my windows system. It was taking so much time so i have stopped sync and used the following command. geth --syncmode "fast" --cache=...
0
votes
0answers
7 views

Can't send when geth started with no peers

I am trying to follow these instructions to send eth without syncing on my pc. ./geth-1.9.0 --maxpeers 0 console Then TX={ from: FROM, to: TO, value: VALUE, nonce: NONCE, gas: GAS, gasPrice: ...
0
votes
2answers
46 views

Calling function with one parameter in Solidity

I am trying to call a function with one parameter I have used these methods all didn't work: //z=addmul(total); //this.addmul(total); This is the function created: function addmul(uint256 a, uint256 ...

15 30 50 per page