All Questions

0
votes
1answer
3 views

Specify an alternative node (IP:Port) for Drizzle, if there is no MetaMask or Web3-enabled browser

Drizzle will automatically use the injected Web3 object. But if there is now Web3 object, Drizzle will try to connect to ws://127.0.0.1:8545'. How to configure Drizzle to connect to Infura.io for ...
1
vote
1answer
8 views

Function which only reads data still using gas/tx fee

I have a function call which only reads data from contract but it still costs gas to execute: function foo(int256 x) public returns (bool) { if(tuna[x].validOnce == true){ if(dog[x] == ...
0
votes
0answers
10 views

Is it okay to define the following smart contract that a accepts funds from two parties?

I want to deploy a smart contract that receive funds from two parties. The contract is initialized with some ethers from person (call it revealer), and another Recipient (name it fineRecipient) who ...
0
votes
0answers
5 views

Deploying large contract (bytecode = ~31k) in genesis.json causes genesis.json to be ignored

I am deploying a private blockchain and currently I can set "gasLimit": "0xE00000000" in my genesis.json and when I run eth.getBlock("latest") I see the proper gas limit and other settings. However, ...
0
votes
0answers
4 views

Web3 not connecting with ropsten through infura

so my truffle based application is communicating fine with my smart contracts on my private network, ganache and ganache-cli. I then deployed it to ropsten where i used the endpoint i got from infura....
1
vote
1answer
8 views

Web3 1.0 Nested contract promises

What is the best way to handled nested contract call with web3 1.0? I'm trying to collect all data needed and format it into something useable. It could require 2 or 3 calls though. Is there a easy ...
0
votes
0answers
7 views

Invalid JSON Response while connecting DApp, Metamask and Backend

I am getting some error(picture below) while trying to connect DApp with a backend. One day ago, everything worked fine, now I got an error: "basic auth failure". Contracts are deployed on Ropsten ...
0
votes
0answers
11 views

Revert on ERC20.transferFrom

I am getting Error: Returned error: VM Exception while processing transaction: revert when testing MyContract.deposit() Here are simplified versions of my code to highlight where the issue is ...
0
votes
1answer
11 views

Can use smart contract as payment gateway

Most suggest that cannot use ERC20 token as payment gateway integration .Why?
0
votes
0answers
11 views

How to use allowance on a contract to giveaway tokens to users?

I have a token contract. I want to allow a site to give away my tokens to its users. I read i have to approve the owner of that site as allowance to use a set number of tokens for giving away to its ...
2
votes
1answer
12 views

Passing '-1' to a solidity function which takes a 'uint256' argument as input

Suppose I have: function func(uint256 x) external { ... } I would like to test this function via web3.js, with the maximum possible value of x. In a Truffle test, I have noticed that I can ...
-1
votes
0answers
13 views

Declaration error: please help

pragma solidity ^0.4.16; import './SafeMath.sol'; /** * @title Equality * @dev the interface of PoSTokenStandard */ contract Equality { uint256 public stakeStartTime; uint256 public ...
2
votes
2answers
15 views

How to speed up data loading from the blockchain to the frontend?

I have a function that, according to the Unique ID of the car, gives me all its characteristics: function getCarArray(uint _carId) public view returns (uint[12] memory) ...
0
votes
1answer
6 views

How to use 2 different constructors with open-zeppelin

I don't understand well how to implement an smart contract to create a capped Token. If I want to follow the example of a simple token is easy: https://github.com/OpenZeppelin/openzeppelin-solidity/...
2
votes
0answers
21 views

Why I can't use two functions with same name, but different parameters

I have a function which returns address but it gives me error if I try to read it. I'll explain by a quick example: Solidity: contract TestOneReturn { mapping(uint => uint) m_Data; ...
0
votes
0answers
5 views

Ethereum on error value is not a convertible string

Unable to get User Error The returned value is not a convertible string.
1
vote
0answers
12 views

Error: Cannot create instance of X; no code at address

Having a little issue. I have deployed a Mock ERC20 contract on development network like so: const ERC20Mock = artifacts.require("ERC20Mock"); module.exports = async function(deployer, network, ...
0
votes
1answer
8 views

How to get the last n bytes of a bytes32 in assembly?

I have the following code: function getBytes5() public returns (bytes5) { uint256 x = now; bytes memory inBytes = new bytes(32); bytes5 outBytes5; assembly { mstore(...
0
votes
0answers
6 views

Ethereum web3 Browser Only functions

Two of the functions of web3 - web3.eth.accounts.wallet.load - web3.eth.accounts.wallet.save Mentioned in the Doc of web3, these are browser only functions. Already tried to test these function ...
2
votes
1answer
14 views

the Constantinople upgrade activates at Block #7280000

Should I upgrade to the latest go-etherum before the Constantinople upgrade activates at Block #7280000? If I do not upgrade, will it affect my node to do transactions?
0
votes
0answers
17 views

web3.eth.getAccounts() : Cannot read property 'map' of undefined

const HDWalletProvider = require('truffle-hdwallet-provider'); const Web3 = require('web3'); const provider = new HDWalletProvider( 'passphrase', 'rinkeby.infura.io/v3/mytoken' ); const web3 = new ...
1
vote
0answers
16 views

Unable to retrieve ethereum address from the signed data

I used the web3.eth.accounts.recover method to retrieve the ethereum address but I am getting an error. Here is the code: let v = '0x' + signed_nonce.slice(130,134); let r = signed_nonce.slice(0,...
0
votes
0answers
4 views

In truffle5, how to manipulate time with evm_increaseTime?

I am using truffle 5 and ganache-cli. I've imported increaseTime as import increaseTime from './helper/increaseTime'; and the increaseTime.js file is like this export default function increaseTime(...
-4
votes
0answers
10 views

Big Number Error : Bignumber is not a base 16 number [on hold]

http://disq.us/p/1zvfcta Please solve and fix the error occured on the system.
0
votes
0answers
13 views

Truffle migrate not working with 2_deploy_contracts.js

I have made a sample contract using Truffle's pet-shop. I have also added the 2_deploy_contracts.js file. I have changed the solidity version and also the constructor() public {} to comply with the ...
0
votes
0answers
7 views

Debugging a reverted transaction

I have two wallets: Wallet1: 0x8882528C7104e146E0500203C353C09922575385 Wallet2: 0xddCf0FeC78b5a20B9138F5DDb1357E3B60026a67 Each of them has more than 1 Ropsten ETH. Using web3js and Infura ...
0
votes
0answers
7 views

can we make contract owner to pay the Gas Price for other user? [duplicate]

I want to create wallet Dapp. Then i will become the owner of the contract then for the other user who will use my Dapp they will become the users for my Dapp.For every transaction they have pay the ...
0
votes
1answer
11 views

Quorum Tessera Implementation in Go

as Quorum and Ethereum are developed in Go, would like to understand why Tessera, the new Quorum transaction manager to replace Constellation, is written in Java instead of Go? Thank you. Nathan Aw
1
vote
1answer
8 views

What is the Withdrawal Pattern?

I am reading this article : https://medium.com/@jgm.orinoco/why-use-the-withdrawal-pattern-d5255921ca2a It seems interesting. Could anyone explain the idea of the Withdrawal pattern in a simple way ?
1
vote
0answers
4 views

Stakeholder entry censorship in PoS

If I am not mistaken, the following two assertions hold true for Ethereum PoS: An entity becomes a validator in the upcoming PoS block validation scheme by first issuing a special transaction to ...
0
votes
1answer
11 views

changing source of random number based on reward?

Would this be an acceptable way to produce a random number dependent on the reward? Say if the reward is high enough to entice a miner to manipulate the block then the contract will utilize oraclize. ...
0
votes
0answers
8 views

What does this Truffle onConnect error mean?

I've been following a tutorial to set up a simple voting application just for experimentation purposes but after installing truffle, it seems it won't connect. Heres the error I'm getting when I try ...
0
votes
0answers
8 views

installing Truffle node-gyp rebuild Error

im trying to install Truffle and have run into numerous problems - made some headway after getting an earlier version of python but camt seem to figure out this error - could someone point me in the ...
0
votes
1answer
25 views

Buy/Sell Smart Contract - how to start?

I have a dapp that allows you to upload pictures into blockchain using IPFS and I would like to implement a buy/sell smart contract that will allow users to buy the pictures or to setup terms to sell ...
0
votes
0answers
5 views

truffle cant find function from contract made with address and abi

So I have a factory contract "RestaurantFactory" which i migrate, this contract creates another contract "Restaurant", after deploying the RestaurantFactory and calling createRestaurant() I receive an ...
5
votes
2answers
75 views

How is it possible to pay 2,100 Ether ($309,267) for a transaction fee?

Here is the transaction details that has transaction fee for 2,100 Ether ($309,267.00) only for sending 0.1 Ether. There is no fairness for users, hence accidentally adding a zero might cause them ...
1
vote
1answer
9 views

How to initialize empty Drizzle instance and later provide contracts data

Following Drizzle documentation, Drizzle instance can only be created with: const drizzle = new Drizzle(options) Where the options is mandatory. And trying to not pass options will generate an error:...
1
vote
1answer
7 views

Ethereum with Rails

I am much familiar with Rails but new in the Ethereum. But base on my understanding, if I am going to build a Dapp. The web stack should not include the back-end system like Rails. But why there's so ...
1
vote
1answer
8 views

Most stable / reliable testnet

I hope this question isn't too vague, but it would really help me to get some advice on from the community on this subject. Which testnet is the most suitable for testing of a dapp? Do testnet ...
0
votes
1answer
12 views

Props object value not flowing to next page [on hold]

I am unable to figure out why the props.query.address is returning "undefined". I am using next.js for routing. Please have a look at below screenshot, Please note the highlighted route, When i ...
0
votes
0answers
19 views

Truffle Pet Shop Tutorial App.js - Send Multiple Form Values to Function

Working through a little project using the Truffle Pet Shop as the starting point and hit a wall. It looks like this is the piece in App.js that fires the handleAdopt function: bindEvents: function() ...
0
votes
0answers
11 views

Issue with truffle migrate

I'm trying to migrate a simple contract on the ganache blockchain.But when I type 'truffle migrate' command in the terminal.It freezes for some time and then command execution stops without showing ...
1
vote
1answer
26 views

Is it possible to call a payable function within __callback of Oraclize?

I want to run an Oracle query periodically and my idea was to call getUTCTimestamp(0) for the first query where getUTCTimestamp is: function getUTCTimestamp(uint256 delay) payable { oraclize_query(...
0
votes
0answers
5 views

ERC20 token transfer with a multisignature wallet

I have a multisignature wallet(it is a different contract). I have some tokens to transfer to another address(token is an ERC20 and can transfer via (yourContract.methods.transfer(toAddress, amount)) ...
0
votes
0answers
17 views

API for private state

assume that I have a private smart contract between peers A and B using quorum blockchain. Then, the variables of the smart contract will be placed in the private state. My question is: Can I make ...
1
vote
1answer
11 views

Geth Proof of Authority Implementation

I have implemented PoA on private blockchain with following genesis.json. { "config": { "chainId": 1515, "homesteadBlock": 1, "eip150Block": 2, "eip150Hash": "...
0
votes
1answer
16 views

Can i call transfer function in other contract?

can i call ERC20 token's transfer function in other contract? like transfer AToken from using BContract's function can I?
1
vote
0answers
7 views

Need help on ethstats app for private net

have anyone used the --ethstats for private net? I am trying to use it but I see below in the geth logs Stats server unreachable err="websocket.Dial ws://host:port/api: unexpected EOF" Stats ...
0
votes
1answer
21 views

can we pay the gas price in form of token?

can we pay the gas price in form of ERC20 token without using the ether? if ERC20 token has a value.then can we pay the gas price in form of ERC20 token.
0
votes
2answers
46 views

Getting error while buying test ether from https://faucet.metamask.io/

I just tried to buy a test ether from https://faucet.metamask.io but the faucet address which is supposed to give 1 ether doesn't have enough balance. Snapshot of the faucet address And when i ...

15 30 50 per page