All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

onlyOwner check fails using Proxy Contract

I was testing delegate calls with the proxy pattern for the upgradable contract. Things were going good till the time I added onlyOwner modifier. My Contracts pragma solidity 0.5.8; contract ...
0
votes
0answers
3 views

Using delegatecall for multiple parameters fuction in solidity

Does someone have a exemple of solidity delegatecall for multiple parameters function?
0
votes
1answer
16 views

Metamask TestRPC shows 0 Ether while connecting to Ganache- CLI

I've gone through various Q/A(s) of the problem of ganache-cli and metamask not linking but after trying all the solutions, still doesn't work for me. As soon as I type ganache-cli in windows cmd ...
0
votes
0answers
11 views

About transaction higher nonce than current nonce

I'm working with concurrent Ethereum transaction (old discussed thread). Sometimes, invalid nonce can be occured, I'm using Redis and physical DB to storage nonce, actually higher nonce than current ...
0
votes
1answer
15 views

How to choose wallet with web3

I have MEW and Metamask installed. When I am trying to send a transaction using: web3.eth.sendTransaction() It always uses Metamask. May I know how can I specify I want to use MEW instead?
0
votes
0answers
17 views

Truffle - Get ETH Balance with Web3JS - two different errors

Using Gnache and Truffle unit tests, I have tried two helper routines to get Eth balance for an address. URL to source of the code in comments inline below: const Web3 = require('web3') const ...
0
votes
1answer
11 views

Checking for no duplicate values in an array

I have an uint256[] array. I need to check that no value is repeated in the array more than once. What is an efficient way to do this?
0
votes
1answer
10 views

Using a Non-Fungible token to gain access to a file

Please excuse me, I'm a layperson, not a programmer. At this time is there a way to issue NFT's to be used as a 'key' to gain access to a file on the internet? For example you create and sell an NFT ...
0
votes
1answer
13 views

Need to enumerate keys of a mapping

I have a directed multigraph of courts "trusting" each other: struct TrustedCourt { uint256 courtId; mapping (uint256 => uint256) limits; // intercourt token => amount } ...
1
vote
2answers
13 views

How to generate a new token address?

Developing an ERC1155 contract, how to generate an address for a new token? I need to create an API function like function createToken() returns (address). How? Should I just use an incrementing-by-...
0
votes
1answer
9 views

Truffle returning balances from a function

This maybe just a simple Javascript issue, but it's in the context of running under Truffle. I can't seem to access my object variables coming back from my function; thus the tests are failing with ...
0
votes
0answers
9 views

Why are there non-batch transfers in ERC-1155?

Why are there non-batch transfers in ERC-1155? Why not the API only for batch transfers? It would make contract codes shorter and thus simplified contract development and saved gas.
0
votes
2answers
19 views

Why use nodepools or backends?

I have a fundamental question about eth/blockchain infrastructure. I see several posts talking about the need for backend node infrastructure when launching a dapp/ smart contract. This infrastructure ...
0
votes
0answers
7 views

How to swap BTC to WBTC

Wrapped Bitcoin (WBTC) is the first ERC20 token backed 1:1 with Bitcoin. So there must be a mechanism to lock BTC in the Bitcoin network and mint WBTC in Ethereum. I read about custodians and ...
0
votes
0answers
10 views

How to deploy contract using ropsten infural url and web3.py? [duplicate]

# web3.py instance >>> w3 = Web3(Web3.EthereumTesterProvider()) # set pre-funded account as sender >>> w3.eth.defaultAccount = w3.eth.accounts[0] # get bytecode >>> ...
0
votes
1answer
9 views

Correct terminology for minting?

I am creating a contract such that for every wallet owner there is a "special" set of tokens that he can send to other wallets in unlimited quantifies (even if having zero or little of this token on ...
0
votes
0answers
7 views

Where to specify the spent limit?

I am creating a contract representing a court. A court can add an arbitrary amount of crypto to any account of its choice. (This is what a court is intended for.) It looks reasonable to assign a ...
0
votes
0answers
4 views

Whats the use of utility token if you don't want ICOs for your dapps?

You can mint coins and do your ico to get money. But what if I want an app without any ICO, will utility tokens still useful. Can't all transactions be made with already existing ether or dia stable ...
0
votes
0answers
8 views

What is operator approval in context of ERC-1155?

https://github.com/enjin/erc-1155/blob/master/contracts/ERC1155.sol says something about "operator approval". What is an operator and what is operator approval?
0
votes
0answers
5 views

How to use metamask wallet address and private key with ropsten and web3.py

I have used ganache RPC server and account address to compile and deploy contract, i want to use rospten account and metamask account for the same. I dont want metamask plugin to pop up everytime ...
0
votes
1answer
9 views

One or multiple owners?

My contract is controlled by owner(s) who can decide to discharge the money from it. The owner also can assign another owner, set spending limits, etc. Should the contract have one or several owners? ...
-2
votes
0answers
15 views

How to get length of a structure? [on hold]

I have structure candidate and I wanna get the length of candidate structure. struct Candidate { string name; uint voteCount; uint candidateslength; } Candidate[] public candidates; ...
0
votes
1answer
18 views

What Would Be The Reward For Smart Contract Miners In Ethereum POS?

I have seen this: What’s the block reward for smart contract miners? Which addresses it for the POW period of Ethereum, but what about POS? They just earn a sort of "interest" for their stake as ...
1
vote
2answers
16 views

Where are Geth's “fast” and “light” syncing options officially documented?

Go Ethereum's documentation for running the command line program is at https://geth.ethereum.org/docs/interface/command-line-options There it specifies the --syncmode option with the explanation: ...
0
votes
1answer
11 views

In MetaMask, I have my seed phrase but I didn't export my private keys. How do I recover my wallet?

So, I've been using MetaMask to try app.compound.finance and everything went well. I've deposited a small sum and connected the app to the wallet. But a few weeks later I decided to deleted the chrome ...
0
votes
1answer
22 views

I want the full list of ethereum smart‑contracts whose balances increased by 1000 Ethers above the past week

How to make this kind of query using my 200kb/s second Internet connection speed ? With such speed, there’s no possibility to run an archival node (except maybe with a service allowing to download ...
0
votes
0answers
18 views

Blocktime zero (period:0) with clique in permissioned blockchain

I am considering to set the blocktime to zero (clique.period:0) in a permissioned private blockchain with known but untrusted nodes. The reason to do this is having a minimum transaction process ...
0
votes
2answers
35 views

Sign message with web3 and verify with openzeppelin-solidity ECDSA.sol

I'm trying to get a little example working with ECDSA.sol here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol This contract: Generate a random(...
0
votes
0answers
21 views

Why use Chrome Extensions for Hardware Wallets?

Is there any way for a remote webserver to connect to a USB device using serial? If so, why did major hardware wallets use a Chrome Extension as opposed to a backend server for connection? Ledger used ...
2
votes
1answer
15 views

If external function declarations are saving gas, why aren't we using it for the transfer functions?

All the source code I could find (to date) has declared transfer, transferFrom, approve, approveAndCall as public and not external. Although external can be used, what is the reason behind not using ...
0
votes
1answer
20 views

Not able to successfully send Transactions via MetaMask on Firefox Browser

Does anybody help me figuring out why I am getting failed transaction here?What does this error means? Few days back,with the same line of code,I was able to successfully send transactions. An update:...
-1
votes
0answers
13 views

After Creation Contcact and receive ETH it answer messagem ERRO and Block Owner [on hold]

After Creation Contcact and receive ETH it answer messagem ERRO and Block Owner It was made with CODE Pattern when Eth was watched like Model to ERC 20 How to cancel or erase contract and Get Back ...
0
votes
1answer
30 views

Error Handling on Contract Calls to Other Contracts

I'm trying to call a function from another contract and need a way to accommodate errors. Say contract A has the method getBalance: function getBalance(address x) public view ...
-1
votes
1answer
49 views

How many projects are there which implement ERC1155 standard?

New ERC1155 standard which is thought to be an improved version of ERC721 and ERC20. But I see many projects still prefer ERC20 or ERC721 standards. If so, do you know any projects implementing ...
0
votes
1answer
14 views

How does Ethereum's Makerdao Dai stablecoin differ from EOS's Equilibrium EOSDT stable coin?

What are the main differences from Ethereum's makerdao dai stablecoin to EOS's equilibrium EOSDT stablecoin? And are there other stablecoins like these two that are decentralized and issued via a ...
0
votes
1answer
14 views

Kovan contract creation gas limit behavior

I have a fairly large contract that I must create on Kovan network for testing. There is fairly weird behavior occurring when I am trying to create the said contract. Behavior being: whenever ...
0
votes
0answers
30 views

Comparison of 2 child-contract-values in factory-contract

in my solidity code I create a tracking-contract and auction-contracts out of a factory-contract. The last function 'a4_Payment' of the auction-contract should be triggered out of the master-contract ...
0
votes
0answers
11 views

How to deploy smart contract with private wallet?

I am now deploying smart contract using ganache localhost:7545, i want to use infura ropsten account to deploy. Most examples uses Metamask, but i want use own ethreum wallet. How can i use to deploy? ...
0
votes
1answer
41 views

Invalid sender address, failed to deploy a transaction to the blockchain network

Description I'm trying to deploy a contract to rinkeby network, but everytime I like to deploy the contract it throwing error as invalid sender. Compile code const path = require('path'); const fs =...
1
vote
1answer
32 views

Different gas usage of trivial reverting contract function

We are currently testing functions on Ropsten test network and have an issue regarding the gas usage. Our functions sometimes use 12 gas more and we can not fathom why that would be the case. To test ...
0
votes
2answers
29 views

invalid number value for power of 18

Using web3js v1.2.1 const contract = new web3.eth.Contract(abi, '0x29...'); const amount = 1 * 10 ** 18; const data = contract.methods.transfer(recipient, amount).encodeABI(); I get error : invalid ...
0
votes
2answers
30 views

Error: Invalid JSON RPC response: “” from web3

I run: geth --rinkeby --rpc --rpcport=8545 --rpcaddr=192.168.1.37 It works in console: geth attach http://192.168.1.37:8545 > eth.syncing false > eth.accounts ["...
0
votes
1answer
15 views

mistake about importing another contract into one contract in remix

I import another contract Hello.sol in contract test1.sol, but after deploying it, only contract Hello's function is displayed in the run interface, not contract test1's function???What is wrong?What ...
1
vote
0answers
6 views

Offchain voting

Are there any voting based approaches where voting would happen off chain, via signed messages, but then the result could be indepedently verified or even stored on chain? Voting rights are based on ...
0
votes
1answer
11 views

What’s the 0x4 precompile?

Simple question but I couldn’t find the answer. Is it the datacopy precompile? and if yes, what it does?
0
votes
1answer
27 views

CompilerError: Stack too deep, try removing local variables [on hold]

interface AgreementInterface { function newAgreement(string _leaser, bytes32 _houseId, string _houseAddress, string _describe, bytes32 _signInfo, uint256 _rental, uint ...
0
votes
1answer
18 views

Not able to generate java wrapper class from solidity smart contract using truffle

I'm trying to generate java wrapper class of solidity smart contract using truffle but not getting wrapperclass.java file Here is an command which i've used to generate abi/Json of that contract ...
0
votes
0answers
13 views

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
9 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
20 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 ...

15 30 50 per page