texts:
What to do to resolve below issue coming in initiating a truffle project?

YuweideMacBook-Air:vantoken yuwei$ truffle version
Truffle v4.1.4 (core: 4.1.4)
Solidity v0.4.21 (solc-js)

YuweideMacBook-Air:vantoken yuwei$ **truffle init**
Downloading...
Error: Something already exists at the destination. Please unbox in an empty folder. Stopping to prevent overwriting data.
    at /usr/local/lib/node_modules/truffle/build/webpack:/~/truffle-box/lib/utils/unbox.js:22:1
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)


texts:
function transferFunds(uint _value) private {
        uint _fee = (3*_value)/(2*100);

        //Perform Ether transfer method
        merchant.transfer(_value - _fee);
        admin.transfer(_fee);
        emit LogForwardedEther(_value, merchant, _value - _fee, admin, _fee);
    }

   function transferFunds(address _token) private {
        uint _value = ERC20(_token).balanceOf(address(this));
        uint _fee = (3*_value)/(2*100);

        //Perform Token transfer method
        ERC20(_token).transfer(merchant, _value - _fee);
        ERC20(_token).transfer(admin, _fee);
        emit LogForwardedToken(_value, merchant, _value - _fee, admin, _fee, _token);
    }

Noticed that there's two separate "Potential Violation of Checks-Effects-Interaction pattern" in the above two functions, but i can't seem to find a better way of handling the state before executing transfer.

Hope someone out there could advise on this.

Thanks!


texts: Declaring function with the same name but different arguments in a derived contract

texts:
What happens if one declares a function with the same name as a function in a base contract, but with different arguments in a derived contract?
How does it behave with different combinations of presence/absence of virtual modifier?
What's in different version of Solidity?


texts: solc command is generating empty .bin files

texts:
Firstly, this is not an inheritance problem like in this post

I have the following two files ( ManagedWallet.sol & ManagedWalletLookup.sol )

pragma solidity ^0.4.24;

contract ManagedWalletLookup {
    address private _owner;

    mapping(address => address) public _managedWallets;

    constructor () internal {
        _owner = msg.sender;
    }

    modifier isOwner() {
        require(msg.sender == _owner);
        _;
    }

    function updateManagedWallets(address wallet, address owner) public
        isOwner {
        _managedWallets[owner] = wallet;
    }

}

and...

pragma solidity ^0.4.24;

contract ManagedWallet {
    address private _owner;
    address private _manager;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor (address owner) internal {
        _owner = owner;
        _manager = msg.sender;
    }

    modifier isOwnerOrManager() {
        require(msg.sender == _owner || msg.sender == _manager);
        _;
    }

    function transferOwnership(address newOwner) public isOwnerOrManager {
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

When I type

 solc --version

into the terminal it prints

Version: 0.4.24+commit

so the solc is the right version. However, anytime I enter the command

solc ManagedWallet.sol --bin --abi --optimize -o ./

or

solc ManagedWalletLookup.sol --bin --abi --optimize -o ./

It returns empty .bin files

Any idea why this might be happening?


texts: How can I make my Contracts be able to mint tokens from my deployed ERC20 Token?

texts:
I have a DApp that wants to use a token I have deployed has a form of payment.
The problem I'm facing is making that DApp be able to ask the Token contract to mint some of its tokens, and then send them to an address.
They have the Minter role solutions and permission systems in the OpenZeppelin library but none of them seem to address the problem of the token already existing, and then accepting some outside contracts as an allowed Minters.
Pretty much, what I am looking to do is:
contract MyToken is ERC20 {
  function mintSomeTokensForDApp(address _receiver) {
    // Mint X tokens and then sends them to the receiver
  }
}

contract DApp {
  MyToken token public; // Can also just be the address of the token

  constructor() {
    token = new MyToken();
  }

  function sendToken(address _receiver) {
    token.mintSomeTokensForDApp(_receiver);
  }

}

I can feel that there is something missing here, as if it was possible anyone could just contact all Token contracts out there and just ask for a million of tokens to be minted and sent. However I assume that there is a way to make the Token contract say "I will accept requests from address with this kind of X", what that X is what I'm stuck about right now.
Any guidance would be greatly appreciated.
Cheers!


texts: How to add a donation function in a smart contract

texts:
How would I add a donation function to this type of smart contract
https://etherscan.io/address/0x39E5BD6AE0f2aA9240D2ae7fBF49e36F05dd339F#code

Basically, what I would like to do is have a small fee added to the airdrop function so that when someone claims a small donation is made as part of the transaction (say 0.00001 ETH or similar).  To use the GetAirdop function it is recommended to use 200,000 GAS. It will be clearly stated that is the case and I thought a good way for a charity based token to raise funding whilst giving away tokens.


texts:
The solidity documentation says that

  Everything that is inside a contract is visible to all external
  observers. Making something private only prevents other contracts from
  accessing and modifying the information, but it will still be visible
  to the whole world outside of the blockchain.

What does this boil down to? Of course that the node running code involving a private member knows its type and value and that given the contract address you could get this info as well. But is there anything more to this transparency? I guess that in order to find anything else about the private member you would have to do some serious reverse engineering (assuming that you do not have an ABI).


texts: get address of new contract from contract factory

texts:
i need to deploy a rental contract at runtime whenever user want's to start the contract. for this purpose i have acontract factory. here is the actual code for facotry

pragma solidity ^0.4.8;
import './RentalContract.sol';

contract contractFactory {
  address[] public contracts;

  function getContractCount() public returns(uint) {
    return contracts.length;
  }

  function newContract(uint _rent, uint _security_deposit, string _house, address _owner, address _tenant)
  public payable returns(address)  {
    Rental c = new Rental(_rent, _security_deposit, _house, _owner, _tenant);
    contracts.push(c);
    return c;
  }
}

this function newContract is suposed to return the address of new rental contract. Here is the my angular service which calls this function to get the address of new contract.

   import { Injectable } from '@angular/core';
    import * as Web3 from 'web3';
    import {Observable} from 'rxjs/Observable';
    import { fromPromise } from 'rxjs/observable/fromPromise';
    import {observable} from "rxjs/symbol/observable";
    import {reject} from "q";

    const FactoryArtifacts = require('/home/work/angularplustruffle/angular4-truffle-starter-dapp/build/contracts/contractFactory.json');
    const contract = require('truffle-contract');
    const RentalArtifacts = require('/home/work/angularplustruffle/angular4-truffle-starter-dapp/build/contracts/Rental.json');

    declare let require: any;
    declare let window: any;

    @Injectable()
    export class ContractsService {
      ContractFactory = contract(FactoryArtifacts);
      Rental = contract(RentalArtifacts);
      private web3: any;
      public acc_no: any = 5;

      constructor() {
        if (typeof window.web3 !== 'undefined') {
          // Use Mist/MetaMask's provider
          this.web3 = new Web3(window.web3.currentProvider);
          this.ContractFactory.setProvider(window.web3.currentProvider);
          this.Rental.setProvider(window.web3.currentProvider);

          /* if (this.web3.version.network !== '4') {
            alert('Please connect to the Rinkeby network');
          } */
        } else {
          console.warn(
            'Please use a dapp browser like mist or MetaMask plugin for chrome'
          );
        }
      }

 public deployRentalContract(rent, security_deposit, house, owner, tenant): Observable<any> {
    let meta;
      return Observable.create( observer => {
        this.ContractFactory
          .deployed()
          .then( instance => {
              meta = instance;
              console.log('data to send:' + "rent " + rent, " security " + security_deposit + " house" + house + " owner" + owner + " tenant" + tenant);
              return meta.newContract(rent, security_deposit, house, owner, tenant, {from: this.web3.eth.accounts[0],
                gas:1000000, value: this.web3.toWei(0.01, "ether")});
          })
          .then(value => {
            console.log("value is");
            console.log(value);
            observer.next(value);
            observer.complete();
          })
          .catch(e => {
            console.log(e);
            observer.error(e);
          });
      });
  }
}

but instead of getting an address i am getting following response

how can i get actual address instead?


texts:
I am just wondering on how good my computer could be and if there are any steps i have failed to take to make sure it is running/mining at its fullest potential. Also any tips on hardware upgrades for better performance would be greatly appreciated as well.

My hardware includes:

EVGA 500W 80+ Bronze certified ATX Power Supply

Kingston HyperX Fury Black 8GB (2 x 4GB) DDR4-2133 Memory

Sandisk SSD PLUS 240GB 2.5" Solid Slate Drive

MSI GAMING Radeon RX 480 GDDR5 4GB CrossFire VR Ready FinFET DirectX 12 Graphics Card (RX 480 ARMOR 4G OC)

Intel Boxed Core I5-6600 FC-LGA14C 3.30 Ghz 6 M Processor Cache 4 LGA 1151 BX80662I56600

also is there anything software wise i can do to make my gpu run at max potential.

Thanks for he help!


texts: Quorum - How to guard against DDOS if there are no gas transaction fee in private enterprise blockchain

texts: In public blockchain, DDOS is thwarted via the use of gas transaction fee. In private blockchain (i.e., enterprise ethereum Quorum), how can DDOS be thwarted? Through throttling?


texts: How to process Smart Contracts payable functions in batch?

texts:
I am aware that metamask will enable effective security for processing via the web browser a payable function action to a smart contract.

What happens in batch?

I have an API service which then needs to call payable functions in smart contracts. There would be no direct human involvement in the call. It would be all machine based.

Is there a secure way to call the function so that the private keys are not exposed on the server or in the code under these conditions?

I wondered if truffle would work for this.


texts: How to find deployed transaction hash of any given contract in chain, with just "contract address" information?

texts: Am trying to write small application which will be able to find Contract deployment transaction with only input parameter - contract address. The application should be able to search entire net.,i,e say Rinkeby and should exactly find deployed transaction hash. This is applicable for any given contract address in rinkeby. I do not want to search with events or logs. Specifically am looking for how to find all the transactions with "0x0" as target programmatically?


texts: Infura .watch Error: Invalid JSON RPC response: “”

texts:
I’m trying to use the .watch() command on an event in my contract. Whenever I run the .js file, I’m presented with the following:

Error: Invalid JSON RPC response: “”

I’m not at my computer and can’t paste my .js file until later today, but what does this error suggest? It is displayed every time the file is executed. Could it be an issue with the contract instance or web3 itself?

Thank you in advance.


texts: cannot pass any parameters to solidity contract on create button in remix

texts:
I have a solidity contract which compiled fine in remix and when I try to deploy it I cannot pass parameters to the constructor method from the create button. It seems disabled. But once after I click create I am able to pass constructor parameters from the constructor method button. Using solidity compiler 0.4.18.

Is that normal behavior? The code is below

pragma solidity ^0.4.0;
contract Election{

    struct Candidate{
        string name;
        uint voteCount;
    }

    struct Voter{
        bool voted;
        uint voteIndex; //this is the candidate index whom the voter cast vote
        uint weight; // this is to make sure the voter is authorized and has a   specific value other than default
    }
    address public owner;
    string public name;
    mapping (address => Voter) public voters;
    Candidate [] public candidates;
    uint public electionEnd;
    event ElectionResult(string name, uint voteCount);

    function election(string _name, uint durationMinutes, string candidate1, string candidate2 ){
        owner = msg.sender;
        name = _name;
        electionEnd = now + (durationMinutes * 1);
        candidates.push(Candidate(candidate1,0));
        candidates.push(Candidate(candidate2,0));

    }
    function authorize(address voter){

        require(msg.sender == owner);
        require(!(voters[voter].voted));
        //voters[voter] = Voter(false,0); This will allow any address to vote
        voters[voter].weight = 1;
    }
    function vote(uint voteIndex){
        require(now < electionEnd);
        require(!voters[msg.sender].voted);
        voters[msg.sender].voted = true;
        voters[msg.sender].voteIndex = voteIndex;
        candidates[voteIndex].voteCount += voters[msg.sender].weight;
    }
    function end(){
        require(msg.sender == owner);
        require(now >= electionEnd);
        for(uint i=0; i< candidates.length; i++){ // the for loop will publish election results for each candidate
            ElectionResult(candidates[i].name, candidates[i].voteCount); // calling the event to display result in UI passing results
        }
    }
}


texts: (JS) Wait until web3 has been established before running function

texts:
I'm using an event listener for "DOMContentLoaded" to hopefully wait until my web3 instance has been established. Unfortunately, this does not work as expected and in my getHash() function web3 has yet to be instantiated. What's the proper way to listen for when web3 has been defined?
<!DOCTYPE html>

Transaction Hash Fetch.

Here is the hash for "Transfer(address,address,uint256)"


texts: scope of references to external smart contract, global variables, eleminiate redundant code

texts:
Imagine that there's a smart contract deployed which contains a number of sub-contracts like so:
pragma solidity ^0.5.0;

contract A {
   address contract = 0x6663130dDfF21E3BC963Ee902005223b9A202106;
   ...
   contract.doSomething()
}

contract B {
   address contract = 0x6663130dDfF21E3BC963Ee902005223b9A202106;
   ...
   contract.doSomethingElse()
}

Is it possible to extract the reference that both of them make to the same external contract so as not to duplicate the same code?
For example something like this:
pragma solidity ^0.5.0;

address contract = 0x6663130dDfF21E3BC963Ee902005223b9A202106;

contract A {
   ...
   contract.doSomething()
}

contract B {
   ...
   contract.doSomethingElse()
}

Is that valid?
UPDATE
contract Fruit {
    address thing = address(12345);
}

contract Apple is Fruit {
    function eat() external {
        thing.call("");
    }
}

contract Banana is Fruit {
    function eat() external {
        thing.call("");
    }
}

^is there a way to prove definitively that this uses less gas?


texts: testrpc Error: Module did not self-register

texts:
I get this error when i run the testrpc command.

node version v5.11.1
npm version 3.8.6
web3 0.15.3


texts: Help on recovering wallet through brute force or from extension data (Bounty on recovery)

texts:
I know 10 of 64 characters (hex) of my ethereum private key unencrypted and their positions. I also know the corresponding wallet address.

Is a brute-force possible? What I am thinking of is generating addresses from private keys in ascending order until the address matches mine.
Is there a more efficient method since I know the address?

How long does an average PC take to generate addresses for say 100 private keys?

I had imported the unencrypted private key once to Metamask (Chrome) and removed the extension. Is it possible to recover the private key from data recovered from C:\Users\ Username \AppData\Local\Google\Chrome\User Data ? I remember the password used while setting it up (before importing) if it is of use.

I will give bounty if your help contributes to recovering my wallet.

Please help!


texts: Why does my private network transaction use a different amount of gas than my mainnet transaction performed immediately after?

texts:
I am forking the mainnet from my own geth node with ganache-cli --fork option. Immediately after the fork, I simulate a transaction to a contract on the forked, private network. I then immediately send that same exact transaction on the mainnet. These are the same transactions from the same account with the same nonce.

After the transactions are processed, I am finding that the gas_used on the mainnet is ~1% (or less) different than the gas_used on the ganache fork. How can this be if I simply forked the network and sent two equivalent contract transactions? Can it have something to do with the solc compiler versions?


texts:
I need to create something like ethernodes.org or etherscan.io/nodetracker. First of all, I tried to implement Discovery Protocol by own, but after couple of minutes I realized that specs are too hard to implement.

How can I easily get node info using external enode (30303) port?


texts:
I am trying to use web3.py with Infura as my HTTP Provider, and several things aren't working. I modified the example code from the web3.py Documentation to use my own contract, which is published on the Ropsten network.

My question is how do I generate an Ethereum account so that w3.eth.accounts[0] returns something besides an empty list? I have checked the documentation and cannot find how to do this. I have also tried replacing w3.eth.accounts[0] with other addresses (like my Metamask address), but this results in the following error:

Traceback (most recent call last):
  File "C:\Users\Eugene\Documents\UCLA\Year 1\ECE 209AS\Blockchain Project\test.py", line 242, in <module>
    tx_hash = contract.deploy(transaction={'from': '0xc0615cb1a1a57422d3887fa4874958578013e842'})
  File "C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\lib\site-packages\web3\contract.py", line 308, in deploy
    deploy_transaction['data'] = cls._encode_constructor_data(args, kwargs)
  File "C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eth_utils\string.py", line 108, in inner
    return force_obj_to_text(fn(*args, **kwargs))
  File "C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\lib\site-packages\web3\contract.py", line 749, in _encode_constructor_data
    arguments = merge_args_and_kwargs(constructor_abi, args, kwargs)
  File "C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eth_utils\string.py", line 92, in inner
    return fn(*text_args, **text_kwargs)
  File "C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\lib\site-packages\web3\utils\abi.py", line 185, in merge_args_and_kwargs
    len(args) + len(kwargs),
TypeError: Incorrect argument count.  Expected '1'.  Got '0'

Here is my code with the abi and bytecode omitted for brevity.

import json
import web3

from web3 import Web3, HTTPProvider, TestRPCProvider
from web3.contract import ConciseContract
# web3.py instance
w3 = Web3(HTTPProvider('https://ropsten.infura.io/SdO4U3ydQdgK3D3eNE2Y'))

# Instantiate and deploy contract
contract = w3.eth.contract(abi=[
...
], bytecode={
    "linkReferences": {},
    "object": "...",
    "opcodes": "...",
    "sourceMap": "..."
})

# Get transaction hash from deployed contract
tx_hash = contract.deploy(transaction={'from': w3.eth.accounts[0], 'gas': 410000})

# Get tx receipt to get contract address
tx_receipt = w3.eth.getTransactionReceipt(tx_hash)
contract_address = tx_receipt['contractAddress']

# Contract instance in concise mode
# contract_instance = w3.eth.contract(contract_interface['abi'], contract_address, ContractFactoryClass=ConciseContract)


texts: What is the solution when owner.transfer(msg.value) function becomes fail?

texts:
contract A {
  function sendtoken() payable returns(bool) {
      require(msg.value!=0);
      balances[msg.sender]+= 1;
      balances[owner]-= 1;
      owner.transfer(msg.value);
      return true;
  }
}

Here if the owner.transfer(msg.value) function fails, then the token will definitely send to the sender, but the ether will not get to the owner. How can prevent this error? Is calling the function owner.transfer(msg.value) before the token transfer a better solution?


texts: What is the API Key to input for Etherscan Contract Verification in Remix IDE?

texts:
I would like to ask, where can I obtain the said API Key for Etherscan Contract Verification in Remix IDE?

I did provide the API Key as highlighted in Yellow Color but is Invalid API Key.

What type of API Key in Remix IDE need? Any ideas?


texts:
There are three EOAs: A, B, and C.  B has no token.

TX1: A call approve B for 100 token.
TX2: B call transferFrom for 100 token from A to B.
TX3: B call transfer 100 token to C.

If these three transactions are included in same block, TX3 can success?


texts:
Hello to everyone. I am looking at multiple inheritance in Solidity. I came across this example within their documentation, but it is not understandable enought for me.

Can someone explane this sentence in more detail:

  The reason for this is that C requests X to override A (by specifying
  A, X in this order), but A itself requests to override X, which is a
  contradiction that cannot be resolved.

My question is why C requests X to override A, i.e. what this order of inheritance means exactly?

    pragma solidity ^0.4.0;

     contract X {}
     contract A is X {}
     contract C is A, X {}


texts: There is an address that is hacked, the bot is monitoring it and payments are received regularly!

texts:
So, the bot instantly cancels these payments by sending, for example, 0.01 eth with a commission (fee) of 0.009 to another wallet, or even canceling everything through self - sending 0 to the same address, with a fee of 0.01!
In addition, the address contains ERC20 tokens for $ 1000, which the bot does not touch.
Prompt any script that can be run through geth to monitor the address and try to withdraw tokens or take the incoming ETH? - I have a private key!
I tried to try to start a transaction with the setInterval function at a time when there is zero in the wallet, so that when a payment arrives there, the transaction would occur, because it would be repeated all the time, but after 5 minutes it throws out the console from Geth, moreover, incoming payments are different all the time ...
What is the principle of the bot itself? Is he runing through Geth? Where is there a script for such a bot? The ether, by the way, is being transferred to different addresses all the time! But the bot monitors many of these addresses!
I understand that there are even a lot of bots that compete with each other!
Can you get something out of this? Or is it impossible?


texts: Installing and running a node on ethereum

texts:
In order to install Geth, in terminal it did not work :

bash <(curl https://install-geth.ethereum.org)

and in browser also that URL did not work.

Why it showing error like this?

Link for reference: https://ethereum.gitbooks.io/frontier-guide/content/getting_a_client.html


texts: Should I route forwarding contracts through a second forwarding contract?

texts:
This is more of a question of filter events, I guess.

If I have 500k deposit addresses and they are all forwarding to one account and emitting event logs with address(this) and msg.value, would it be easier/more convenient to forward them all to one forwarding contract which then logs the msg.sender and msg.value, then forwards to the account?

All log events in one contract seems easier to handle than listening to events for 500k contracts.


texts: Is it still possible to replay a single transaction on ETC and ETH from a pre DAO-fork address?

texts: If, for some reason, I want to spend both ETH and ETC to the same address in a single transaction right now, how would I do that? The ether is currently in a pre DAO-fork address.


texts: I thik it is kind of clear to me that of 50%+1 attack, but now i am thinking about something that occurred when i was testing a DAPP in a two node network. Each node had a blockchain (the same blockchain) with about 7000+ blocks (they both had equal number of blocks). I was using go-ethereum (GETH). Then i stopped the proccess, ran it again, and connected the two nodes, when i check the number of blocks on each of them, it was twice the number before (14000+). So, it is clear to me that the valid blockchain is the one present in 50%+1 of nodes of the network. But, what happens when 50% of the network has a different blockchain (both blockchains could be valid)?


texts: How to recover an ethereum account with the mnemonics ? And the other way around, namely to generate the right mnemonics from an account?

texts:
No geth, or other command line tools, or clients like MetaMask and Mist. What I need is the exact algorithm to recover an account from mnemonics and the other way around.Appreciate implementations of any programming language, or just pseudo-code.
What I've already known is the algorithm to get an entropy and a seed from the mnemonics, and the algorithm to get the mnemonics from an entropy. How can I recover an account from the entropy or the seed? When an account is provided, how can I get the entropy to generate the mnemonics?


texts: Is there a better way to implement search functionality?

texts:
Take the following code for example:

pragma solidity ^0.4.23;

import "./MyContract.sol";

contract MyFactory {
    address[] public myContracts;

    function createContract(string stringOne, string stringTwo, string stringThree) public {
        address sender = msg.sender;
        address newContract = new MyContract(sender, stringOne, stringTwo, stringThree);
        myContracts.push(newContract);
    }

    function getAllContracts() public view returns(address[]) {
        return myContracts;
    }
}

And then also this:

pragma solidity ^0.4.23;

contract MyContract {
    address public createdBy;
    string public stringOne;
    string public stringTwo;
    string public stringThree;

    constructor(address sender, string one, string two, string three) public {
        createdBy = sender;
        stringOne = one;
        stringTwo = two;
        stringThree = three;
    }

    function getContractSummary() public view returns(address, string, string, string) {
        return (
            createdBy,
            stringOne,
            stringTwo,
            stringThree
        );
    }
}

The best way I can think to search through all the contracts that have been created by the factory would be to create a mapping in the factory:

mapping(string => address) public contractNames;

When creating a new contract we could push stringOne to the mapping along with the address that the contract was created at.

Then we could call the public getter that this would create and pass the users search term. If the search term was found we could get back the address that the contract was deployed at.

The only problem with this approach is that we would only receive back results that matched the search term exactly.

Is there a better way to implement this functionality? Or is this as good as it gets?


texts: How to import accounts with mnemonic in web3 console

texts:
geth attach http://localhost:8545

How to import accounts with mnemonic in this Geth console...
like web3.personal.importRawKey("XXXX")


texts: Truffle migrate no error but does not create build directory

texts:
I'm trying to develop a simple dapp using ReactJS.I used Charterhouse/truffle-create-react-app box suggested by truffle website.
The problem is truffle compile and truffle migrate do not seem to work.
All I get is this:

Compiling ./contracts/Migrations.sol...
Compiling ./contracts/SimpleStorage.sol...

No errors but build directory is not created.

I'm using ganache-cli and Metamask.
Here's my truffle.js:

 module.exports = {
 networks: {
 development: {
  host: 'localhost',
  port: 8545,
  network_id: '*' // Match any network id
   }
 },
 compilers: {
      solc: '^0.4.24' //added because I have written my own contracts
                      //with this version
   },
   solc: {
     optimizer: {
     enabled: true,
     runs: 200
     }
   }
 }

output of truffle network:

Contracts have not been deployed to any network.

output of truffle version:

Truffle v5.0.0 (core: 5.0.0)
Solidity v0.5.0 (solc-js)
Node v8.10.0

I have also tried truffle compile and truffle migrate with --reset and --all but no differences.


texts: How can I access my ETC Wallet? (Ubuntu 14.04)

texts:
I would like to do the ETC/ETH split but first I have to access my ETC ethers.

I once created a contract from my main account. How do I get access from my main account to that contract that holds the ether? They are still there on gastracker.io.

So far I tried:

using geth from Ethereum Classic to rebuild the old blockchain
copy the key from my main account to ~/.ethereum-classic/keystore
start Ethereum Classic Mist Wallet 0.8.1 to access the main
account

Now my questions:

There are still some blocks missing. Do I have to sync all blocks to
access the contract that I made with my main account? Why do the
last thousend blocks take so long?
There are no ether on my main account. Do I need one ether on the
account to restore my Contract?
How exactly do I restore my contract if Mist finally synced? I have
a hash here from gastracker.io and a password.

Thanks!


texts: I'm super new to all this Ethereum stuff. Can anyone suggest me a place to learn how it works?

texts: I've been tasked with writing a blockchain-based application (probably written in JS) that can be used to certify documents. I've done some research into where I can get stuff hosted (Infura looks the best right now). Can anyone suggest me a place to learn all about Ethereum/blockchain? And where would I start with the creation of my project? Thank you in advance.


texts: Always same INSUFFICIENT_OUTPUT_AMOUNT error

texts:
I've been trying to swap some DAI which I sent to the contract to WETH. However even after trying to change the contract a bit I always get the same error output:
transact to GibIhmHart.runUniswap errored: Error: Returned error: VM Exception while processing transaction: revert UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT
Tried changing up the parameters of expectedAmountOut but still no results.
Any help is much appreciated... been coding for weeks on this project and feel like I'm getting close. Thought a few times about throwing my comp against the wall...
Thanks in advance
EDIT: Using psolidity 0.8.0
EDIT II:
function runUniswap(uint amount, address fromtoken, address totoken, address ExchangeContract) public returns (uint){
        IERC20 srcToken = IERC20(fromtoken);
        IERC20 dstToken = IERC20(totoken);
        srcToken.transfer(address(this), amount);

        IUniswapV2Router02 uniswap = IUniswapV2Router02(ExchangeContract);
        srcToken.approve(address(uniswap), amount);
        address[] memory path = new address[](2);
        path[0] = address(srcToken);
        path[1] = address(dstToken);
        uint[] memory minOuts = uniswap.getAmountsOut(amount, path);
        uniswap.swapExactTokensForTokens(
          amount,
          minOuts[0],
          path,
          address(this),
          block.timestamp+15
        );
        return dstToken.balanceOf(address(this));
    }


texts: Data availability in Ethereum/Hyperledger-fabric (Blockchain)

texts:
I have  a use-case like there is an admin who creates application and invites several user to use that application.  Now, i need to audit trail over the activities done by the user.

Users no need to maintain Blockchain(BC) , but admin will.. In general admin can get the transaction hash, timestamp and other block related metadata details but not the RAW data ( like what activity is been done, what changes have been made on specific work etc).

My understanding -- The person who creates a data will be the one who can read the data in any BC. The data will be updated to ledger being encrypted using specific persons PUBLIC and PRIVATE key.. so admin who is just like a regulator can only provide application ,the account is created for the user specifically and all txn data done by user is encrypted using keys.  is my understanding correct ?

How do i go with Audit trailing being an admin , for users activities wherein i need info not just about timestamp and hash but also few extra RAW data ?

Is there a way i can expose only know data or few data to admin so that he can view it in audit trail ?

can EVENT data in BC be seen by every participants in network ? will this be useful in my case ?


texts: I am running Mist on VPS with 512MB RAM, but it crashes, and the process is killed automatically. What are the minimum system requirements to run Mist and how much memory do I need?


texts: How to acquire ERC20 tokens on a test net?

texts: I want to interact with a smart contract on Rinkeby, but I need to have ERC20 tokens to do so. I know how to get Ether on Rinkeby, but how would I get ERC20 tokens? Do I have to deploy and ERC20 contract, and give myself some?


texts: geth 1.8.15 flag provided but not defined: --fast

texts:
Geth version I have:
Version: 1.8.15-unstable
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.11
Operating System: linux
GOPATH=
GOROOT=/usr/local/go

go version:
$ which go
/usr/bin/go
$ go version
go version go1.11 linux/amd64
$ echo $GOROOT
(Blank line)

geth --fast --cache=1024 ...

The error I am receiving:
flag provided but not defined: -fast

I was able to use --fast flag on the previous versions but now I cannot.
Is is because --fast flag removed or something else. How could I fix this error? Is there any alternative flag for --fast?
=> Similar issue.


texts:
I have an EIP1167 factory contract on Polygon that I'm going to use to trigger the deployment of custom ERC20 tokens. Once deployed via the factory I want to map the tokens on Polygon's bridge in order to be able to transfer them cross-chain. As you might know, having the token mapping setup on Polygon's bridge requires the token contracts to be verified on both chains (on Etherscan and Blockscout). However, Polygon's Blockscout instance seems to not support EIP1167 (although the Blockscout version they run, 3.6.0-beta, has support for EIP1167 contracts it doesn't seem to be properly configured - eg. check out this EIP1167 contract that is not detected as an EIP1167 contract and has no option for reading the contract code: https://explorer-mumbai.maticvigil.com/address/0x5f473dabe0B31475607FAf6C163bCF0b100F40a2/transactions).
For this reason, I'm looking for alternatives to EIP1167. More specifically, I want the factory to work exactly as before (that is, have a deployed logic contract that acts as a draft for futher deployments - it's very important to be able to change the logic contract on the go and have further deployments use the updated logic contracts while old deployments keep using the old logic contract). Is there a way to do this? More specifically, how can I get the deployment bytecode of an already deployed contract and use it to trigger new deployments?


texts: How to ensure correct ordering when using a for loop in truffle test

texts:
I am using truffle (javascript) to test my solidity contracts and want to automatically run my contract functions a large number of times. I can't figure out how to make a for loop work with promises however as I need it to wait until the whole loop is finished to start again. I'm currently just using a regular for loop with the promises chained up within it. I have included below my roughly anonymised code.

Thanks

for(var j = 0; j < 5; j++) {
    //create parameters for function
    runFunc(param1 ,param2);
}

function runFunc(param1, param2) {
    contract.func1.call(param1).then(function(return1) {
        var var1 = = web3.toAscii(account1hash.valueOf());
        contract.func2(param2, var1).then(function() {
            contract.func3(param1, param2);
        });
    });
}


texts: How to rename accounts in ethereum wallet?

texts:
I have 4 accounts in my ethereum wallet(using a private blockchain network) and they are named as:
1. Main Account(etherbase)
2. Account 2
3. Account 3
4. Account 4

Can anyone help me out to rename these account names?


texts: Why do transaction receipts not include the value of Ether transferred?

texts:
I'm writing some logic to identify the currency used in an ethereum transaction, and am wondering the following:

web3.eth.getTransaction returns a value field that indicates the value transferred in Wei.

However I'm using receipts, and web3.eth.getTransactionReceipt does not include the value transferred, which seems a little unintuitive. Why is this the case?


texts: Why do no transactions and no balance show on a wallet I know has a transaction history?

texts:
I created an Ethereum wallet 4 years ago, and bought some ether. At the time it was purely an experiment and I knew very little about crypto, I just wanted to see how to do it. I then forgot about it for some years, and recently thought I would look back at that old wallet. However, I could find the keystore but did not remember ever creating a password, so I resigned myself to never being able to access it again and wrote the ether off as lost.

But recently, I discovered a private key from exactly the same date the wallet was created, so I used that to access it. But the balance said zero ether. I checked it on etherscan and it also said zero, but it also has no transaction history.

What could be going on? Could I doing something wrong and somehow looking at the wrong wallet? I thought perhaps it had been hacked and the ether removed, but then shouldn't I be able to see the transaction history, which should at least contain the initial purchase of ether I made in 2016?

Thanks for any help. As I say, I have largely written off the ether as lost, but am curious to know what's going on and see if I can recover it.

The address in question is 0xa9A9aa61751Ad176f8E02694A0bD9Ed7e1A9C617


texts: Generate directory hash without upload using Swarm API

texts:
I am using the Swarm API (github.com/ethersphere/swarm/) with go to upload a directory on a private network. The client API(/api/client) provides a UploadDirectory function which returns a manifest hash. Is there a way to calculate the same Merkle Tree hash without uploading the files to the Swarm storage, preferably with the API ? The reason for doing this is to upload the directory at some later point of time and verify the hash with the one calculated before.

Any help with some possible areas I can look at would be really appreciated.


texts: How to transfer tokens from smart contract using PHP?

texts: I want to transfer tokens using PHP script and that script will be executed using cronjob, is there library available to transfer by unlocking account using private key?


texts: How to integrate rinkeby test network with centralised server?

texts:
I am new to ethereum blockchain. I want to create ICO platform based website. I have created smart contract and deployed on rinkeby test network. I used python web3.py library to integrate python with solidity.

I am using python django web framework as frontend. I created a instance of solidity compile file in python. And use this instance to retrieve smart contract data. And shows these data on template. It all functionality done with ganache local blockchain.

When I deployed smart contract on rinkeby test network. So I change my web3 HTTP provider to IPC provider in python file.

So In that case I deploy Django functionality on AWS server. I find error with IPC provider. Because geth.ipc
file missing on server.

So I have Query regarding it:-

Query 1:-
How to give geth web3 IPC provider in python file when I deployed on AWS server??

Thanks.


texts:
I know about the general open / trustless protocol of storing transactions. How would I approach a scenario here where I want to store some data in a contract on deployment, to later be retrieved by someone unknown at the time of deployment?

The main problem here is that the receiver of the secret data is not known in advance / when providing the secret data. Therefore simply encrypting the data with buyers public key is not a valid approach

E.g. I have a contract which stores secret number and other users can interact with the Dapp and bid on these numbers, only the highest bidder shall receive the true secret number in the end.


texts:
I try interect with contract. I use this tutorial and this.

I deploed this contract in ropsten testnet by address: 0xF55F55d2b15949ae78a34478CF356D9fF8bB0629.
I can read counter value. But I can`t increse counter. I have error as:

This is code of my script in html file:

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Interect with contract</title>

Interact with contract

    <button onclick="getCounter()">UpdateCounter</button>
    <button onclick="increaseCounter()">IncreaseCounter</button>

I don`t use geth.
Is it possible to do without using geht?
How can I fix error?


texts: Estimate Gas For Smart Contract Always Fails

texts:
I have deployed a very simple contract to the Ethereum blockchain to be able to split a payment across two different outputs.

pragma solidity ^0.5.0;

contract MoonTrade
{
    function multiSendETH(  address payable address1,
                            uint value1,
                            address payable address2,
                            uint value2) public payable
    {
        address1.transfer(value1);
        address2.transfer(value2);

        msg.sender.transfer(address(this).balance);
    }
}

It is on the Ropsten testnet.
https://ropsten.etherscan.io/address/0x3376a6d3e46496944fe7afd838efb949007b80f4

I am using web3py (python)

However, whenever I try to do web3.eth.estimateGas() I always get an error saying:

Gas required exceeds allowance or always failing transaction (Error code -32000)

I'm not sure what I'm doing wrong here.

Here is the input I"m passing to estimate gas:

{'to': 0x3376a6D3e46496944fe7afD838EfB949007B80f4,
    'from': 0xF811E7eD1BBc908f33b1C298087220D249bE0464,
    'value': 50000000000000000,
    'data': b'{"name": "multiSendETH", "types": ["address","uint256","address","uint256"],"inputs":["0xbe623C1f9F47d2105f80A9A5c0Cd90562be5fA58", "40000000000000000","0x366de12a1A6fd0B140153f011c1A085314A047BC", "10000000000000000"]}'}

The data part is obviously converted to bytes using web3.toBytes() before being passed into the estimate gas function.

I'm clueless as to if this error is related to my smart contract or the way I am passing the parameters into estimate gas.

Any ideas?

Here is my debug output:

ABI: [{"constant": false,"inputs": [{"name": "address1","type": "address"},{"name": "value1","type": "uint256"},{"name": "address2","type": "address"},{"name": "value2","type": "uint256"}],"name": "multiSendETH","outputs": [],"payable": true,"stateMutability": "payable","type": "function"}]

Contract address: 0x60946D10048EC9fbB0A260bb17da2eFEbdb76F12

Estimate gas data: {'to': 0x60946D10048EC9fbB0A260bb17da2eFEbdb76F12, 'from': 0xF811E7eD1BBc908f33b1C298087220D249bE0464, 'value': 50000000000000000, 'data': b'{"name": "multiSendETH", "types": ["address","uint256","address","uint256"],"inputs":["0xbe623C1f9F47d2105f80A9A5c0Cd90562be5fA58", "40000000000000000","0x366de12a1A6fd0B140153f011c1A085314A047BC", "10000000000000000"]}'}

Total gas fee in WEI: 6600000000000000

Gas price in WEI: 22000000000

Transaction data to be used: {"name": "multiSendETH", "types": ["address","uint256","address","uint256"],"inputs":["0xbe623C1f9F47d2105f80A9A5c0Cd90562be5fA58", "33400000000000000","0x366de12a1A6fd0B140153f011c1A085314A047BC", "10000000000000000"]}

Signed transaction: AttrDict({'rawTransaction': HexBytes('0xf901488085051f4d5c00830493e09460946d10048ec9fbb0a260bb17da2efebdb76f1287b1a2bc2ec50000b8db7b226e616d65223a20226d756c746953656e64455448222c20227479706573223a205b2261646472657373222c2275696e74323536222c2261646472657373222c2275696e74323536225d2c22696e70757473223a5b22307862653632334331663946343764323130356638304139413563304364393035363262653566413538222c20223333343030303030303030303030303030222c22307833363664653132613141366664304231343031353366303131633141303835333134413034374243222c20223130303030303030303030303030303030225d7d1ba0ba8a017590df650113bbe37c75271013750180e3464145b174baa39318d4d5c4a076c352add8de85ae019ee52949afb54d2a30105e1abe0cc70cd6fef351dbff4c'), 'hash': HexBytes('0x6f4e47b48d1c4e37fc360d97f5e15a05e6100a6058b33442419617c536690e33'), 'r': 84374024802743941308955771074764079224633082170439044639020403769288422643140, 's': 53718021940567424333967254769074396806767762625919492526766162521994190126924, 'v': 27})

Gas: 3E-13

Gas price: 2.2E-8

Value: 0.05

Gas * gasprice + value = 0.0566

{"error":"{'code': -32000, 'message': 'insufficient funds for gas * price + value'}"}


texts: Does the ordering of fields in a contract matter?

texts:
I'm reading the documentation right now:
https://solidity.readthedocs.io/en/v0.5.3/style-guide.html

And it shows the right way to order functions, layout and so on... But there is no information how to order imports as well as fields inside a contract. I have no idea if changing imports order can affect the code or gas, but I made special folders and changed orders in every file's import to:

interfaces [a-z]
libraries [a-z]
abstracts [a-z]
contracts [a-z]

And each of them alphabetically and it looks more clean now. Hope this isn't anyhow wrong?

But going back to the contracts' fields - Should I order them anyhow I like, by importance or alphabetically? And can the different order affect the gas cost?


texts: How can geth access contract variables through the console?

texts:
I'm using the Mist wallet just to display the contents of the contract.
Bellow, you can see the code to access the contract function (submitUnits) and the result of the LoadScript when I run in the console.

 call_function.js
In the last commented row, you can see the value I want to print (100).

Mist wallet

However it always returns this hex number. How can i get the Total Units that is mentioned in the wallet screenshot?

The code of the contract is this:

contract UCounter {
mapping (address => uint256) public UnitsFrom;
uint256 public TotalUnits;

function submitUnits(uint256 Units) returns (uint ){
    UnitsFrom[msg.sender] = Units;
    TotalUnits = Units;
    return TotalUnits;
}

}

Hope someone could help.
Thanks.


texts:
I'm having trouble understanding why people call
array.length--

after deleting an element in an array (as seen in this answer and many others). Why is there need for doing so? When is the length of an array evaluated? Or maybe I'm missing something obvious, what does array.length-- actually do?


texts:
This is an incredibly annoying issue. I cannot get into MetaMask in chrome, the screen won't pop up and instead shows white space. The plugin console does not throw any error. I have tried restarting metamask, restarting Chrome, but it all doesn't work.

On Firefox it works, so it appears that there is no connection issue.

Any idea how to fix this, or where to look at?

Edit: this still is an issue. (Will only use bump once)


texts: Why not use mining power to execute contracts?

texts: Ethereum developers certainly considered the idea of using mining power to do useful work - i.e., run contracts - rather than "waste" it with meaningless hashes. I'm interested in knowing what have been learned from that idea, and why it was ultimately discarded.


texts: I was writing and testing some contracts using Remix. I worked just fine, but for some reasons the sol files didn’t load up today. I tried to search it in my local storage but could not find them. Can anyone help out? Thanks


texts: Are the timestamps of blocks for Ethereum only accepted when they are monotonically increasing? If yes, why? And why other blockchains like Bitcoin and other blockchains with shorter block time can have more tolerance on timestamps (by setting a window and can accept blocks with timestamps within that window)?.


texts: INSUFFICIENT_OUTPUT_AMOUNT error when attempting Uniswap swap from a contract

texts:
While I'm able to successfully swap ETH for DAI, I'm running into an INSUFFICIENT_OUTPUT_AMOUNT error when trying to swap DAI for ETH using swapExactTokensForETH, even with amountOutMin set to 0. I also tried with LINK with the same result: ETH => LINK works fine, LINK => ETH gives INSUFFICIENT_OUTPUT_AMOUNT.
I've tried both on Kovan and using Hardhat's forked mainnet. This is the function I'm trying to call:
  function swapTokensForEth(address token, uint amountIn, uint deadline) external payable {
    IERC20(token).transferFrom(msg.sender, address(this), amountIn);

    address[] memory path = new address[](2);
    path[0] = token;
    path[1] = uniswap.WETH();

    IERC20(token).approve(address(uniswap), amountIn);

    // https://uniswap.org/docs/v2/smart-contracts/library/#getamountout
    uint[] memory amountOutMin = getEstimatedTokenForETH(amountIn, path); // Fails even when this is 0.

    // https://uniswap.org/docs/v2/smart-contracts/router02/#swapexacttokensforeth
    uniswap.swapExactTokensForETH(
      amountIn,
      amountOutMin[1],
      path,
      msg.sender,
      deadline
    );
  }

  function getEstimatedTokenForETH(uint amountIn , address[] memory path) public view returns (uint[] memory) {
      return uniswap.getAmountsOut(amountIn, path);
  }


texts: Can one safely use a bitcoin block hash as a source of randomness in an ethereum contract?

texts:
This question here Why aren't block hashes a reliable source of randomness? explains why it is not a good idea to use an ethereum block hash as a source of randomness (SoR) for a contract C; the reason being that a miner with an interest in the outcome of C could "redraw" that hash as many times as needed to drive C to the miner's preferred outcome.

Of course re-drawing is costly (it costs the miner the reward of the block thrown to the bin) and one can use a block hash as a SoR safely if the expected value derived from redrawing is way below that of re-drawing in the first place.

Here are the two questions I have:

how is the ethereum transition to PoS going to change this?
one way to set the re-drawing cost higher is to use a block hash on a chain where rewards are higher eg bitcoin's - is that a good idea?


texts: How to construct deployable bytecode from runtime bytecode?

texts:
For example I want to redeploy/clone a contract to another address but don't have the original source code, so I only have the runtime bytecode stored on the blockchain. If I try to deploy the runtime bytecode directly, it will result in a failure. So is there any way to construct valid deployable bytecode from runtime bytecode, so that the exact same contract code can be deployed/cloned to another address?

I'm not looking to deploy a forwarder proxy, I know how to do that in both solidity assembly and vyper, what I need is to deploy the exact same runtime bytecode to a new address without the original source code. Thanks.


texts: How to get all transactions in ganache-cli that have not been mined yet?

texts:
Considering a scenario in ganache where a block is mined every 200 seconds
ganache-cli --blockTime 200

how can I get the all the transactions that have been sent but not yet mined?


texts: Showing block confirmations on a user transaction, best practices?

texts:
I'm working on a site that allows users to deploy smart contracts via MetaMask. Basically they customize it, it gets compiled, and then the user deploys it by via a MetaMask transaction.

I would like to show this newly created contract on a page, where other users can click and interact with it. However, I'm unsure of what the best practices are when displaying newly created contracts from the blockchain.

Should I display a confirmation count beside the contract? Should interaction buttons be be greyed out / inaccessible for other users until we have enough confirmations? Should we not show the contract until we have enough confirmations? Any opinions on these tradeoffs is appreciated.


texts: is there a library to convert transaction receipt to rlp?

texts: I found ethereumjs-tx for transaction to rlp, but i didnt find any libraries to convert transaction reciept to rlp. or is there a way to get rlp format transaction receipt from a service like infura or parity with a given transaction hash?


texts:
Maybe my question is way off base here, because I'm an ethereum novice.  I would like to run miners on the rinkeby testnet.  I'm more interested in getting the mining process up and running and exploring the effects of that.  I know there are better ways of getting ethereum - that's not why I'm mining.

If anyone can offer pointers or advice on how to set up miners on the testnet, I would appreciate it!


texts:
So I just [FEB 12, 2018] spun up an Ubuntu 16.04 VM and installed geth using the ppa.

geth version

  Geth
  Version: 1.7.3-stable
  Git Commit: 4bb3c89d44e372e6a9ab85a8be0c9345265c763a
  Architecture: amd64
  Protocol Versions: [63 62]
  Network Id: 1
  Go Version: go1.9
  Operating System: linux
  GOPATH=
  GOROOT=/usr/lib/go-1.9

Now I would like to connect to testnet.  My internet research claims I should be able to do

geth --testnet --syncmode "fast"

or

geth --testnet --rpc --rpcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --syncmode "fast" --rpccorsdomain '*' --rpcaddr 0.0.0.0 --rpcport 8545

Both commands result in the same...

  WARN [02-12|12:13:49] No etherbase set and no accounts found as default
  INFO [02-12|12:13:49] Starting peer-to-peer node               instance=Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9
  INFO [02-12|12:13:49] Allocated cache and file handles         database=/home/parallels/.ethereum/testnet/geth/chaindata cache=128 handles=1024
  INFO [02-12|12:13:49] Initialised chain configuration          config="{ChainID: 3 Homestead: 0 DAO:  DAOSupport: true EIP150: 0 EIP155: 10 EIP158: 10 Byzantium: 1700000 Engine: ethash}"
  INFO [02-12|12:13:49] Disk storage enabled for ethash caches   dir=/home/parallels/.ethereum/testnet/geth/ethash count=3
  INFO [02-12|12:13:49] Disk storage enabled for ethash DAGs     dir=/home/parallels/.ethash                       count=2
  INFO [02-12|12:13:49] Initialising Ethereum protocol           versions="[63 62]" network=3
  INFO [02-12|12:13:49] Loaded most recent local header          number=0 hash=419410…ca4a2d td=1048576
  INFO [02-12|12:13:49] Loaded most recent local full block      number=0 hash=419410…ca4a2d td=1048576
  INFO [02-12|12:13:49] Loaded most recent local fast block      number=0 hash=419410…ca4a2d td=1048576
  INFO [02-12|12:13:49] Loaded local transaction journal         transactions=0 dropped=0
  INFO [02-12|12:13:49] Regenerated local transaction journal    transactions=0 accounts=0
  INFO [02-12|12:13:49] Starting P2P networking
  INFO [02-12|12:13:51] UDP listener up                          self=enode://399e42ef589c6202d31e64509432030b11ed642d261fa337811cb3f7838f606db47ffb91ef91dc464923450f55773f5ace698be2035a95dcaaf77f9843cf4b9b@[::]:30303
  INFO [02-12|12:13:51] HTTP endpoint opened: http://0.0.0.0:8545
  INFO [02-12|12:13:51] RLPx listener up                         self=enode://399e42ef589c6202d31e64509432030b11ed642d261fa337811cb3f7838f606db47ffb91ef91dc464923450f55773f5ace698be2035a95dcaaf77f9843cf4b9b@[::]:30303
  INFO [02-12|12:13:51] IPC endpoint opened: /home/parallels/.ethereum/testnet/geth.ipc

It appears to be stuck on IPC endpoint opened.  I am both a linux newbie and an ethereum newbie.  Just trying to learn.  I don't know where to start looking for what is wrong.  Can you help me get this going?

Update:
After an hour and a half there's a new message

  INFO [02-12|13:44:02] Regenerated local transaction journal    transactions=0 accounts=0


texts:
i want to create an erc20 token swap contract for a crowdsale im building right now. and i dont want to accept ether, i prefer USDT. i found a swap contract example on the internet but it always asks for permission on both sides of the transaction. I want it always have access to my address(where my ico token is) and allow for transfer of my tokens when someone sends me USDT. Here's the swap contract example i talked about;
contract TokenSwap {
    IERC20 public token1;
    address public owner1;
    uint public amount1;
    IERC20 public token2;
    address public owner2;
    uint public amount2;

    constructor(
        address _token1,
        address _owner1,
        uint _amount1,
        address _token2,
        address _owner2,
        uint _amount2
    ) public {
        token1 = IERC20(_token1);
        owner1 = _owner1;
        amount1 = _amount1;
        token2 = IERC20(_token2);
        owner2 = _owner2;
        amount2 = _amount2;
    }

    function swap() public {
        require(msg.sender == owner1 || msg.sender == owner2, "Not authorized");
        require(
            token1.allowance(owner1, address(this)) >= amount1,
            "Token 1 allowance too low"
        );
        require(
            token2.allowance(owner2, address(this)) >= amount2,
            "Token 2 allowance too low"
        );

        _safeTransferFrom(token1, owner1, owner2, amount1);
        _safeTransferFrom(token2, owner2, owner1, amount2);
    }

    function _safeTransferFrom(
        IERC20 token,
        address sender,
        address recipient,
        uint amount
    ) private {
        bool sent = token.transferFrom(sender, recipient, amount);
        require(sent, "Token transfer failed");
    }
}

now can i tie the address _owner1 where my ico tokens will be to my address(0xxxxx) some way and make sure i dont have verify or sign any transaction everytime i receive USDT? and can i also make the token2 to be usdt by making token2 equal to the contract address of usdt? owner two cannot be constant as those are my investors. Thanks, waiting for your suggestions, advice and tips!


texts: I want to deploy my blockchain app in heroku and i just want to use ganache as my blockchain network. is that possible?


texts: Is it possible to modify privateFor addreses in a private Smart Contract (Quorum)?

texts:
I know how a private smart contract works providing a list of accepted addreses to privateFor property, but what if I want to disable (or enable) any address visibility?

Should I deploy a new Smart Contract? Will the Smart Contract always be visible for the privateFor addresses?

Thanks


texts: How exactly does a unique asset get tokenized?

texts:
Say I have a set of assets, each with their own serial# or unique Id. How exactly would I create tokens linked to each asset that could be traded on a 1 to many basis? (ie: trade this one special token for multiple ether)

After looking at some solidity contract code I see many examples of how to create a batch of tokens out of nothing, but I do not see (or understand) how to assign unique values or embed data into a single token.

I hear a lot about how blockchain can be used for this type of thing but it isn't apparent exactly how that is possible.


texts: Quorum - Implement Hybrid Casper FFG / Proof of Stake?

texts: After Ethereum rolls out Hybrid Casper FFG / Proof of Stake in the Serenity release, will Quorum follow suit to incorporate Hybrid Casper FFG / Proof of Stake as another consensus algorithm? (on top of IBFT, Raft)


texts:
I want to build a custom version of geth that provides a new JSON-RPC call to clients.

It looks like there are two pieces to make that happen: (1) a Go implementation in internal/ethapi/api.go, and (2) a Javascript endpoint in jsre/deps/web3.js.

Is that the right approach? What connects those pieces?


texts: Following token tutorial on ethereum.org, get error message "No data is deployed on the contract address"

texts:
I'm simply copying the full coin code found in this tutorial to deploy a contract on the testnet using mist, but I get the error message "No data is deployed on the contract address". The contract then shows up as a transaction in my wallet, but it's not listed under contracts. I'm using biggest fee possible, and my own wallet address as the central minter address input argument. Is this valid? This argument only seems to be used in the line

if(centralMinter != 0 ) owner = msg.sender;

which makes it seem rather redundant to me, so any explanation of this regardless of relevance to the error message is also appreciated!


texts:
We need to call 2 methods of 2 different contracts in Ethereum, and this should be batched in one transaction, either both of them be confirmed or both of them be rejected.
Exactly We want user to pay some ERC20 tokens to a method of a contract X, so first he should call .appove() method of the token contract, then he should call a desired method in the contract X that it call .transferFrom method of the token contract.
Because of some requirements we need to pass some parameters to the method of contract X, it is not possible to send tokens directly to contract X.
If we use another contract Y for this purpose, the caller of .appove() method will not be the main msg.sender.
Is there any way to avoid calling these 2 separate transactions?


texts: error handling in sending custom token to multiple addresses in one transaction

texts:
i am trying to write a contract in which there is a function to divide the amount into equal parts and then deposit it into multiple accounts in one transaction. The problem is that, i want function to reverse or fail the transaction if some error is produced during deposit of any address from the given addresses. And is it possible to make it more dynamic? Thanks

contract amountSplit {

  mapping(address => uint) public toAccountBalance;
  address[2] public beneficiaryList;

  event LogReceived(address sender, uint amount);
  function addAddresses(address addressOne, address addressTwo) {
    beneficiaryList[0]=addressOne;
    beneficiaryList[1]=addressTwo;
  }

  function pay(uint amount) public payable returns(bool success)
  {
    if(amount==0) throw;
    uint forth = amount / 2;

    toAccountBalance[beneficiaryList[0]] += forth;
    toAccountBalance[beneficiaryList[1]] += forth;
    emit LogReceived(msg.sender, msg.value);
    return true;
  }
}


texts: What is the expected daily egress traffic from full Testnet node

texts:
I have a full testnet node running on GCP with Parity. After about a week of having it fully synced, the egress traffic from the server spiked substantially and started sending out 250GB per day to random servers around the world on random ports, until I closed the firewall entirely (not sure if these were other testnet nodes, but assume so)
Unfortunately with the firewall closed completely, the node won't sync anymore.
This amount of traffic seems incredibly high, especially as GCP charges for egress traffic which racked up a $100 bill for three days and the total of 750G total egress.
What is the expected daily traffic that would be sent from a full testnet node?


texts: Token and Crowdsale contracts address problem

texts:
I'm testing the creation and deployment of ERC20 token + Crowdsale based on Open Zeppelin on the Rinkeby testnet using Truffle + Geth.

The deployment went fine it seems, and through Metamask I was able to buy some tokens, and the money did go to the ewallet of the Crowdsale, so far so good.

I've verified the crowdsale contract on Etherscan.io, you can find it here.

Now problem is that there's seems to be something wrong with the association between the crowdsale and the token, as you can see in the "Read Smart Contract" tab, the token address of the crowdsale is 0x2461A615fE99733507CAc3BBCbC83F48DF8667Df which matches the address my truffle deployment gave me, but if you click on it you end up on a page that shows no data, and no way of verifying the contract.

Now if you search for the token on rinkeby.etherscan.io or simply use that same address in the url but replace /address/ with /token/ like this it will show you the correct page of the token with the correct transactions.

Furthermore if on that correct token page I try to verify the contract I end up with the following error:

Error! Unable to locate ContractCode at 0x2461a615fe99733507cac3bbcbc83f48df8667df Is this a valid Contract Address?

Any idea what happened here? Did I mess up something during deployment or in the Smart Contracts?

It did take me a few tries to get the deployment working because of some time constraint so I did run truffle migrare --reset --network rinkeby a few times. Could this have caused the problem?

Or maybe was it because I bought a few tokens before verifying the Crowdsale contract on etherscan? Is this by the way a mandatory step for each Crowdsale?

Also what problems can arise from this weird situation?

Here's the migration code in case it helps:

var JujuCrowdsale = artifacts.require("./JujuCrowdsale.sol");

module.exports = function(deployer, network, accounts){

    return liveDeploy(deployer, accounts);
};

const duration = {
  seconds: function (val) { return val; },
  minutes: function (val) { return val * this.seconds(60); },
  hours: function (val) { return val * this.minutes(60); },
  days: function (val) { return val * this.hours(24); },
  weeks: function (val) { return val * this.days(7); },
  years: function (val) { return val * this.days(365); },
};

async function liveDeploy(deployer, accounts){

    var startTime = web3.eth.getBlock('latest').timestamp + duration.minutes(10);   //starts in 10min
    var endTime = startTime + duration.weeks(4);            //ends in 4 weeks
    var rate = new web3.BigNumber(10);                      //1 ether = 10 JujuCoins
    var wallet = accounts[0];

    console.log('Arguments for crowdsale:');
    console.log([startTime, endTime, rate.toNumber(), wallet]);

    return deployer.deploy(JujuCrowdsale, startTime, endTime, rate, wallet).then( async () => {
        var instance = await JujuCrowdsale.deployed();
        var token = await instance.token.call();
        console.log('Token Address', token);
    });
}

And here's the result of the deployment:

> ruffle migrate --reset --network rinkeby
Using network 'rinkeby'.

Running migration: 1_initial_migration.js
  Replacing Migrations...
  ... 0x5a5f0d3dc7b9645920463e2b14abbc85fc29e952b676a95c29c77c8db7d23fae
  Migrations: 0xb26d81b5bd47b3653b879dbc578f07d9c4a38225
Saving successful migration to network...
  ... 0xd75830ca55a6a164140146ad1ecd0d3cf5fcd1a539139ae19142d53a56feb446
Saving artifacts...
Running migration: 2_deploy_contracts.js
Arguments for crowdsale:
[ 1515431570,
  1517850770,
  10,
  '0x8b3675277ad4543126f057be272373c7df32e3f5' ]
  Deploying JujuCrowdsale...
  ... 0x38cea8fed19e3e6186cbad399f69806ce8645d3db7d23902dc6cd7a5a6d90481
  JujuCrowdsale: 0x8648f0e67459b22cd5ae5a91471c3b4cbb803bcf
Token Address 0x2461a615fe99733507cac3bbcbc83f48df8667df
Saving successful migration to network...
  ... 0x9a6ff5802926f66c26db4c1440e1ccbf4586f16d179794da0f44f8413d4d6495
Saving artifacts...


texts:
How would someone be able to prove they own an ethereum contract to another user in a simple way?

If we save a public key in the contract as belonging to the owner of the contract, and then outside the blockchain the user encrypts a specific message with that private key associated to it, and sends it to another person, they can verify the message was encrypted with that token. Is this a secure way to verify the ownership of a contract?


texts: Get time when the transaction was included in your node

texts: Is there any way to obtain the time when you have received a transaction? I would like to know when is a Smart contract included in my node. (local testnet)


texts: Token Transfer - Pending Verification for + 72H

texts:
I'm currently working on a project that sends mass ethereum token transfers using web3.js and GETH.

On the 1st of December we've sent around 3000 payments but only 80 have been confirmed until now and the rest are pending for 3 days.

We've sent thousands of transfers before without any problem but this time we've set a lower Gas Limit and some transfers got halted.
This, by itself, is a problem, but can be managed because at least we know the transfer has failed, the problem is that we've around 2900 pending transfers without any type of progress over the last 72 hours.
We're facing a dilemma now because we cannot cancel the transfers already sent and also cannot issue new ones due to the risk of double payments.
The transactions appear and disappear on etherscan.io website and we've no idea why.

Is there a maximum amount of time for a transfer to be verified? If so, how
much?
Why did some transfers went trough and others didn't despite
    the fact they had the same settings (gas limit/price)?
What would you do in a situation like this?

I'm aware this question may be a little vague but please understand we've a real problem in hands and all help is welcome, thank you.


texts:
Hi I sent tokens from MEW to a wrong address. My first transaction!
0x70a72833d6bf7f508c8224ce59ea1ef3d0ea3a38

Is there anyway I can get it back or locate the institution or person?

Yours weepingly
MJC


texts: Quorum Enterprise Ethereum - PrivateFor Parameter Passed When Instantiating Contract and/or During Calls to Contract?

texts:
In Quorum, when using privateFor, do we put the PrivateFor parameter during the contract creation and/or during the call to the contract itself?

Only during the creation of the contract
Only during making a function call to the contract
Both -- during the creation of the contract and the function call

Nathan Aw (Singapore)


texts:
I came across published smart contracts (like this one from ConsensSys) that check whether msg.value is strictly larger than zero in their payable functions.

After wondering whether msg.value can be negative, I found this question whose answer says that it's not possible.

These checks, therefore, seem unnecessary to me. Is this to make sure not to fall victim to another negative transaction value bug? Do zero-value transactions pose a threat?


texts:
:) I am new to Ethereum technology. I am studying the web3js JavaScript library from the official documentation and I don't understand the web3.eth.defaultAccount. What is this for? Why I have to use it in my web application? For example, this code:

web3Istance.eth.defaultAccount = web3Istance.eth.accounts[0];

I am using testrpc for testing my Dapp locally. So in this case I set the first account to be the default one. But why I do have to set the default account?


texts:
Geth Clique Block Period 1, Fork of Chain inconsistency

Hello,

In my private Clique network with 4 Nodes (A,B,C,D) I noticed a fork in the chain for block period 1.

I noticed that it happens some times with block period 1 & 2.

I noticed that the fork happens at block 1500 for example. Nodes A & D have a similar chain data meanwhile Nodes B& C have similar data.

At block 1500, I noticed the difference in data between 2 chains: 1) Block hashes are different 2) Block of one chain is an uncle block while for other chain it has 5000 txs included 3) Both blocks have same difficulty 2 which means that it was mined in turn 4) Another complication arises when I noticed it was the same sealer who sealed the block.

This results in fork of the network and stalling at the end which cannot undergo any reorg in this deadlock situation.

I noticed a bug reported already https://github.com/ethereum/go-ethereum/issues/18402 but they have atleast different difficulty and different sealers at the same block height.

Please can some one let me know if you faced this issue or a logical explanation of this issue


texts: Trouble with web3.eth.Contract, ABI usage with Typescript

texts:
I am having a bit of trouble using web3.eth.Contract with Typescript..
import * as ERC721ABI from "../ABIs/ERC721.json";
import Web3 from "web3";

...

const contract = new web3.eth.Contract(ERC721ABI, event.target.value);

...

The error I am receiving is:
Argument of type '({ inputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; name?: undefined; outputs?: undefined; } | { anonymous: boolean; inputs: { ...; }[]; name: string; type: string; stateMutability?: undefined; outputs?: undefined; } | { ...; })[]' is not assignable to parameter of type 'AbiItem | AbiItem[]'.
  Type '({ inputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; name?: undefined; outputs?: undefined; } | { anonymous: boolean; inputs: { ...; }[]; name: string; type: string; stateMutability?: undefined; outputs?: undefined; } | { ...; })[]' is not assignable to type 'AbiItem[]'.
    Type '{ inputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; name?: undefined; outputs?: undefined; } | { anonymous: boolean; inputs: { ...; }[]; name: string; type: string; stateMutability?: undefined; outputs?: undefined; } | { ...; }' is not assignable to type 'AbiItem'.
      Type '{ inputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; name?: undefined; outputs?: undefined; }' is not assignable to type 'AbiItem'.
        Types of property 'stateMutability' are incompatible.
          Type 'string' is not assignable to type '"nonpayable" | "view" | "pure" | "payable" | undefined'.  TS2345

    90 |
    91 |     try {
  > 92 |       const contract = new web3.eth.Contract(ERC721ABI, event.target.value);

Any idea what I'm doing wrong here?
Also, is it possible to import multiple ABIs into web3.eth.Contract, or would I have to create separate instances for each ABI?
Finally, any idea which ABI I would need to use for interacting with Wallets, or would that need a separate call? I'm not quite sure whether Wallets on Ethereum are ALSO smart contracts, or just a public key.
Thanks


texts:
Lets say I create a web application to store user identity documents. These documents are stored in IPFS and user details are maintained in Ethereum private blockchain. Thus once the files are created in IPFS the hash is stored in Ethereum blockchain. Now specific to IPFS if someone is having access to the hash can download the document from IPFS.

One way could be to encrypt the data with some custom algorithm and then store in IPFS. In the web app apply the logic to de-crypt the document fetched from IPFS and then display the same to the user. But this will be a custom implementation.

Question
1. How to make permission based file access based on the provided file hash for IPFS? Is there any standard way of achieving this?


texts: Contract Error: invalid transaction v, r, s values


texts: Blockchain & Solidity : Could you someone explain me what function entrySet is for?

texts:
I found this code online.It's about notorization of some document. I need to understand this code real quick. So could you tell me what function entrySet(bytes32 _checksum) do?
pragma solidity ^0.5.0;

contract Notorization {

    struct MyNotaryEntry {
        string fileName;
        uint timestamp;
        bytes32 checkSum;
        string comments;
        bool isSet;
        address setBy;
    }

    mapping (bytes32 => MyNotaryEntry) public myMapping;

    event NewEntry(bytes32 _checksum, string _filename, address indexed _setBy);

    /**
     * Example: 0x193C167E2B336B32356F17009C923C4CD33AC8E3F62BAD1384E8A049F77FD295, "test", "test"
     * */
    function addEntry(bytes32 _checksum, string memory _fileName, string memory _comments) public {
        require(!myMapping[_checksum].isSet);

        myMapping[_checksum].isSet = true;
        myMapping[_checksum].fileName = _fileName;
        myMapping[_checksum].timestamp = now;
        myMapping[_checksum].comments = _comments;
        myMapping[_checksum].setBy = msg.sender;

        emit NewEntry(_checksum, _fileName, msg.sender);
    }

    function entrySet(bytes32 _checksum) public view returns(string memory, uint, string memory, address) {
        require(myMapping[_checksum].isSet);
        return (myMapping[_checksum].fileName, myMapping[_checksum].timestamp, myMapping[_checksum].comments, myMapping[_checksum].setBy);
    }

}

I have limited knowledge of solidity. I would appreciate so much if you could explain me. Thank you


texts: How do I create an index of other contracts and their methods?

texts:
I want to create a proxy / router contract that stores

addresses of other contracts
function names of other contracts functionality and
accepted parameters in these contracts.
ID for each contract

the proxy contract itself will have an AddContract and RemoveContract that adds these parameters to the registry.
Then I want to be able to use this same contract to proxy calls to other contracts. So if somebody calls a smart contract with ID XYZ, with a function myFunction("Here", "is", 123) it would be routed to the address and function of that defined contract under the same ID.
I would like to be able to add contracts after the original proxy creation too and modify them.
Any ideas on how to go about this?


texts: web3j make raw call to deployed contract which checks transaction sender

texts:
I have deployed contract to rinkeby. Contract method refuses any call except a call from contract owner (aka contract deployer). I can't use Java bindings.

I'm trying to use Function API but it doesn't work. I suppose my call is not signed so contract refuses the call.
code:

val transaction = Transaction.createFunctionCallTransaction(
        contractOwner,
        tnxNonce,
        ManagedTransaction.GAS_PRICE,
        Contract.GAS_LIMIT,
        contractAddress,
        encodedFunction)
 val transactionResponse = web3j.ethSendTransaction(transaction).send()

          val transactionHash = transactionResponse.getTransactionHash

I get:

  [debug] o.w.p.h.HttpService - <-- 405 Method Not Allowed  Invalid
  response received: okhttp3.internal.http.RealResponseBody@52ca2652
  org.web3j.protocol.exceptions.ClientConnectionException: Invalid
  response received: okhttp3.internal.http.RealResponseBody@52ca2652    at
  org.web3j.protocol.http.HttpService.performIO(HttpService.java:114)
    at org.web3j.protocol.Service.send(Service.java:31)     at
  org.web3j.protocol.core.Request.send(Request.java:71)     at
  services.OneOffEthereumServiceTest.$anonfun$new$2(OneOffEthereumServiceTest.scala:196)

what can I try next? How can I sign transaction? I didn' t find proper API.


texts: How to show more than 10 Accounts on Parity's UI?

texts: Parity only shows 10 accounts by default. I have 50 different Ethereum accounts that I'd like to see all within the Parity Account tab. How can that be done?


texts: Deploying contract byte code via assembly

texts:
I'm trying to write a smart contract which will deploy byte code using assembly op_code create. I'm following this post.

But when I call deployCode function I got nothing. Ropsten etherscan tells me that I've exceeded gas limit.
See here. But this contract costs only 1-2 millions of gas.

What I'm doing wrong?


texts:
I'm trying to initialize a directory with truffle init, but I'm getting the following error:

Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist. If you believe this is an error, please contact Truffle support.

The git repository at https://github.com/truffle-box/bare-box.git does exist, so I'm not sure what the problem is. Any help?


texts:
Is there a way to give access of an external storage mechanism only to a smart contract?
So that only the smart contract can upload files


texts: How do I verify the integrity of my local chainblock data?

texts:
If I suspect local data corruption, is there a way to verify that my blockchain data is valid and will not affect my Ethereum work and transactions?

Example: I switched to a self-compiled version of geth and changed parameters after about 30GB of downloading.  I see a .log file where I would expect a .ldb file.  Another example would be if a hard drive is beginning to show data corruption.


texts: Is it possible to send ERC20 tokens to a smart contract that is written to accept payments..?

texts:
I have ERC20 compatible token that is already deployed in the ethereum main-net. I have a requirement to accept these tokens as payment, And this is going to be a new contract, The below are my doubts.

Can I use another ERC20 contract to do this functionality, As I read in some blogs it tells we won't be able track the details of transfer. If it's not the case, Someone please provide me with a sample contract or documents.
I saw some solutions using the ERC223 contract, If that the case can I use my already existing ERC20 tokens to use in the newly created ERC223 token contract..? if available please give a sample contract.


texts: Is Geth's Clique PoA Consensus Algorithm production ready?

texts: Is it recommended to use geth's Clique PoA in a production setup or is it for test-net only? Does someone know of productive deployments of Clique PoA?


texts: How does Ethereum Classic differ from Ethereum?

texts: What are the technical differences between Ethereum Classic and Ethereum?


texts: Exchange ERC20 token with other ERC20 token

texts:
I have 2 ERC20 tokens. The contract are designed as standard ERC20. Here are the 2 tokens to take as an example -

AUDC --> Contract Address: (0xContractAUDC)
         Wallet Address:   (0xWalletAUDC)
DAI  --> Contract Address: (0xContractDAI)
         Wallet Address:   (0xWalletDAI)

I want to transfer some DAI from wallet 0xWalletDAI to 0xWalletAUDC to receive converted AUDC in return (I have private keys of both the wallets).

Looking for some help to know how this can be implemented. I would try to be helpful with more information if needed.

I am using ethers.js v4.0 to interact with blockchain.


texts:
Please suggest that how two restric subscriber for single entry means no one can join twice.

function selectionW1(address subscribersW1, uint subscriberWheelW1) public  {

    require (subscriberWheelW1 == 1 && subscriberListW1.length < 2);
    subscriberListW1.push(subscribersW1);
    subscriberstructsW1[subscribersW1].W1 = subscriberWheelW1;

}


texts: Sent ETH from Lykke with smart contract to Binance.com. Account still not credited? What to do?

texts:
Is my ETH lost if the receiving exchange company does not recognize smart contracts?
is there a way to reverse transaction or recover the ETH sent?


texts:
I am using the Ethereum wallet app made by FreeWallet.net.
I sent  5 Ether then had a alert failed. What's problem?
Thank!


texts: How is data sent to the front-end by a View function?

texts:
I am required to send some data from a view-only function to the front-end. I tried using the standard approach by emitting an event with the required fields. However, when the emit call is placed within a view type function, I get an error stating the emit call is potentially state-changing and, thus, cannot be within a view function.

How is data sent to the front-end by a View function if an event cannot be used?

event TestEvent (uint id);
function test() public view {
    emit TestEvent(123);
}

//Output
... TypeError: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
...


texts:
Here (https://geth.ethereum.org/docs/interface/command-line-options) I can see that --shh flag exists, under geth  v1.9.19-stable-3e064192
WHISPER (EXPERIMENTAL) OPTIONS:
  --shh                               Enable Whisper

But on the geth v1.10.1-stable-c2d2f4ed ; --shh does not exist, is it completely removed?


texts: Where can I see the output of Solidity's sha3 function?

texts:
I have written the below code and it runs perfectly. After mining and passing the values along with certain gas value, i get transaction hash as output on the geth console. Now i want to know the output of sha3 function applied in the code?

contract C {
string a;
string b;
bytes32 d;

function identify(string sm, string bm, bytes32 i) returns (bytes32 hash){
    a = sm;
    b =bm;
    d = i;
    return sha3(sm, bm, i);
}

}

Once mining is  done. i type the following command:

c.identify("Bob","Alice",1234);

I get the transaction has i.e

Contract mined! address: 0x1df37eeccc9278b04497b4a3c97388cac3a98e6f
transactionH
ash: 0x7bf49540c9db92cab84b483514ffebdb600d39889ef2319904bc788d7c87afd9
c.identify("rahul","ankesh",1234,{from:primary,gas:300000})
"0x24d344a11f9aa84d43ccf0e17e635750e3d44fee0c4eaba1c1dea8ebbdaf3376".

Now, where is the output of the sha3 function?


texts: How can I watch my contract using Ganache testRPC?

texts:
I want to get the transaction hash + contract address ... using Ganache testRPC.
since I don't have the option of using etherscan because testrpc of ganache use everything locally.


texts: Handling of reviews hosted on the Ethereum blockchain

texts:
As part of a group academic project we are writing a DApp that will host reviews on the Ethereum blockchain. We have run into a problem regarding reviews that are slanderous or contain profanities. We were wondering how we could possibly still handle the moderation of such reviews while still maintaining the idea that the history of reviews cannot be changed/removed.

Has anyone had a similar problem to this, and did you manage to come up with a viable solution? Thanks.


texts: Parity Syncing Forever? 1 block per second ???? is this the future of Blockchain?

texts:
trying to sync parity wallet from last 30 days its taking forever to sync to the current Block Upto 4.4 Million blocks it took like 2-3 days but from then to 4.5 Million its taking like 1 Block/Sec still 1 Million Blocks to be synced do i need to wait 1000000 Seconds = 16,666 Minutes = 277 Hours = 11 days continuously or is there a ways u Blockchain guys developed ? please do help me in this?
thank you


texts:
I am playing around with geth to understand the principles of the ethereum network. One thing I keep asking myself is how does a public address get created?

For example, you can run an offline version of MyEtherWallet, and still generate an address. How can you be sure that the address is not already given to another user?

When I create an address locally (through geth account new), how can I check if it is synced with the ethereum network? So that I can know for sure that it is safe to send ether to it?


texts: Are there any real examples of Sybil attack?

texts:
I have seen many articles and blog posts talking about Sybil attack but except the case of Tor (Article Link), i couldn't find any relevant articles pointing to the Sybil attack on Computer Networks in real life.

Can anyone suggest some case studies for the same ?

Thanks.


texts:
I am developing a Dapp that contains a notification between two Users.
for example :

User 1 (Student): send a transaction that contains data to be
confirmed.
User 2 (Professor):  receive a notification to validate  the student
data.
User 1 (Student): receive a notification about the    professor
answer.

is't possible to implement this use case using smart contract events?
I took a look to web3.shh but it seems like it miss documentation


texts: Adding a struct to mapping not working on ganache, but works in unit tests?

texts:
I have this code
struct User {
    string name;
    string state;
    uint age;
    string[] recommendations;
    address[] following;
}

mapping(address => User) public users;
mapping(address => bool) userExists;

...

function setup(string memory _name, uint _age, string memory _state) public {
    bytes memory nameBytes = bytes(_name);
    require(nameBytes.length > 0, "Name is empty.");
    users[msg.sender] = User(_name, _state, _age, users[msg.sender].recommendations, users[msg.sender].following);
    userExists[msg.sender] = true;
}
function hasAccount() public view returns (bool) {
    return userExists[msg.sender];
}

Which should just add a user to the users mapping and add true to the userExists mapping.
This is reflected just fine in the unit test:
contract("Social Music", async accounts => {
const [initialAddress] = accounts;

let instance;

beforeEach(async () => {
    instance = await SocialMusic.deployed();
});

it('should set userExists after setup', async () => {
    await instance.setup('testname', 25, 'Test descr');

    const result = await instance.hasAccount();

    expect(result).to.be.true;
});
});

Which seems to be fine, but when I run the function setup in the browser, which shows up in ganache with correct params, nothing seems to be happening to the mapping afterwards.
Ganache: (FYI these are random strings)

and

Yet when calling hasAccount in the browser or looked at it in the ganache GUI it both seems like its not being added (browser gets false back when doing const hasAcc = await socialMusicInstance.methods.hasAccount().call();).
I have no clue whatsoever what this can be about


texts: How to access my wallet with a mnemonic phrase in mycrypto.com desktop app?

texts:
So here is the case:

I downloaded mycrypto.com desktop app and created a mnemonic phrase there. After typing in the phrase it allows to choose a wallet from many different wallet numbers (addresses 0x..). So I chose one and transferred 1 eth onto it.

Now when I type in the mnemonic phrase again, the wallets I am offered to choose from are different from the one initially and of course have zero balance.

The transaction went on smoothly and there are more than 40 confirmations

How can I access that particular wallet now?


texts: Do contract size increase with gas in block?

texts:
I'm trying to deploy a contract with REMIX but it throw an error "smart contract too large, not enough gas".
Is REMIX hardcoded for contract size ?
Do smart contract size increase with blocksize ? For example if we have 18M gas per block, a contract may be 18M gas cost to deploy ?


texts: Store data in transactions instead of in the contract

texts:
I want to store vehicle history in the blockchain. Each historical "event" would contain the vehicle VIN, mileage and date. There are a lot of vehicles and the history per vehicle is fairly small. So deploying a new contract for each vehicle seems wasteful, but storing all vehicles in one contract isn't scalable.

So I was thinking of storing the history simply in the events themselves that the "registrar" contract generates.

Something like this:

pragma solidity ^0.4.21;

contract VehRegistry {
    address public owner;

    event Event(string vin, string mileage, string date);

    function VehRegistry() public {
        owner = msg.sender;
    }

    function registerEvent(string vin, string mileage, string date) public {
        require(msg.sender == owner);
        emit Event(vin, mileage, date);
    }

}

Is this a secure solution (in terms of data integrity)?

And would I be able to look up all events for a given registry address?


texts: Unknown account error while deploying dapp on Ropsten testnet

texts:
While trying to deploy/migrate a dapp to Ropsten I get the following error:

C:\CrowdBank-master\CrowdBank-master>truffle.cmd migrate --reset --network ropsten
Using network 'ropsten'.

Running migration: 1_initial_migration.js
  Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Unknown address - unable to sign transaction for this address: "0x94e1E6DbEf0936d494B7B23C47F80dfA195e28Fa"

I have created the above address (0x94e1E6DbEf0936d494B7B23C47F80dfA195e28Fa) on Metamask, it has a balance of 1 ether.

Here is how my truffle.js file looks like:

// Allows us to use ES6 in our migrations and tests.
var HDWalletProvider = require("truffle-hdwallet-provider");

var infura_apikey = "...";
var mnemonic = "...";
var address = "0x94e1E6DbEf0936d494B7B23C47F80dfA195e28Fa"

module.exports = {
   networks: {
      development: {
        host: 'localhost',
        port: 8545,
        network_id: '*' // Match any network id
      },
      ropsten: {
        provider: function() {
           return new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/...")
           },
        network_id: 3,
        from: address,
        gas: 4000000
      }
    }
  }

Below is a link to the project, its designed for localhost, I modified the truffle.js file to deploy it on ropsten. What else do I have to do?

https://github.com/anshulshah96/LoanDe-centralised

Please help me out on this one.


texts: How many nodes must implement a hard fork for it to succeed?

texts: How many ethereum clients must adopt a hard fork so that it will happen without creating two chains? Probably a 50/50 splitt would create two chains and we have two Ethereums?


texts: Etherscan verification bytecodes don't match

texts:
Hi I'm trying to verify a token deployed at 0x87ab739464881af0011052d4ca0b0d657e8c3b48 in tx 0xbaa8f3fe86a35d2e0b7ed16b24782743e7dfb1eb21cfbb12253d0a50ef2ff365. (Mainnet)

I compiled and deployed it with remix, options:

Compiler version:0.5.2+commit.1df8f40c.Emscripten.clang
Optimization: not enabled.

The contract source code is:

pragma solidity ^0.5.0;

import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol";
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol";
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol";
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";

contract MTB19 is ERC20Pausable, ERC20Burnable, ERC20Capped, ERC20Detailed {

    constructor(uint256 cap, address prefund, uint256 amount) public ERC20Capped(cap) ERC20Detailed("MikeTangoBravo19", "MTB19", 18) {
        mint(prefund, amount);
    }

}

The constructor abi-encoded params are:

0000000000000000000000000000000000000000000003bfe5fd1c4b11cc0000000000000000000000000000d60b471bd8c62dc4d2f04493413c6cb73b7ce4640000000000000000000000000000000000000000000002cfe905a78b63800000

(The openzeppelin dependecy is the one published in github [commit: e287eab])

The bytecode generated by Remix and the Etherscan expected bytecode are equal but when I introduce the flattened code and all the data provided to etherscan verifier bytecodes are totally different. How can I do it so that, bytecodes are the same and it verifies my contract?


texts:
I'm new user of Ethereum.
My error :

Runtime Error: out of gas

My contract :
https://github.com/cbourree/test/wiki

I compile with : https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.0+commit.acd334c9.js

"web3 deployed" generate with solidity : https://github.com/cbourree/test/wiki/Compiled-contract

I run testrpc -u 0 -u 1

On Chrome Console :

I run "web3 deployed" commandes
web3.fromWei(web3.eth.getBalance("0xafd05e5884d2cccc947b76da3e4af9025b677002"), "ether").toNumber(); //0xaf...002 address of my contract

WORK (return 10 Eth) !
But :

roulette.betEven(10, { from: web3.eth.accounts[1], value: web3.toWei(1, "ether") })

->Error : out of gas

The code comes from this tutorial : https://www.ethereum-france.com/ecrire-une-dapp-pour-ethereum-1-smart-contract/

Edit : I can execute the contract in truffle console without error

EDIT 2

When i run

roulette.betOdd({ from: web3.eth.accounts[1] })

then

roulette.betOdd({ from: web3.eth.accounts[1], value: web3.toWei(10, "ether") })

I havn't error. But i don't understand why ???


texts: Event Listener functionality of the Web3.py doesn't register changes

texts:
I am using the python implementation of the web3 library.(https://github.com/pipermerriam/web3.py)
Calling and interacting with contracts works fine, but when it comes to the event listener functionality, none of the fired events are registered by the program.

def transfer_callback(log_entry): print "Event fired"

filter = contract.on("DisplayChange", {})

filter.watch(transfer_callback)

Watching the contracts event in the Ethereum Wallet also works without problems, so the issue is definitely connected to python.
Thank you in advance for any response.


texts:
I need to query this endpoint
'''https://******com/api/payments/{payment_id}/refund'''
Because it is a post request, I assume that the payment_id param needs to be in the body of the request.
How do I add that parameter? Because it is in the middle of the url I do not know how to do it.
thanks a lot