texts: Not able to decode the input data from transaction using web3j (Java)

texts:
I am creating transactions using web3j and passing some private data in that transaction. The transaction is also getting mined . I have subscribed to the mined blocks, where I am fetching the transactions added in the mined block. I want to retrieve the input data passed earlier, but unable to get it. Please help me here.
Code for transacting using web3j:

RawTransactionManager rawTransactionManager =  new RawTransactionManager(web3j ,credentials,100,1000 * 15);
EthSendTransaction send = rawTransactionManager.sendTransaction(gasPrice, Transfer.GAS_LIMIT, toAddress, "<some private data>", BigInteger.valueOf(1));
String hash = send.getTransactionHash();

I also get the hash properly. Then, I subscribed to the blocks as follows:

Subscription subscriptionToBlocks = web3j.blockObservable(true).subscribe(block -> {
        List<TransactionResult> transactions = block.getBlock().getTransactions();
        if(transactions.size > 0){
            transactions.forEach(tx -> {
                  EthBlock.TransactionObject transaction = (EthBlock.TransactionObject) tx.get();
                  System.out.println("transaction data:"+transaction.getInput());
        }

But this results in hex string, however, i want it decrypted again to process it further ie to fetch transfered value and receivers address. Let me know how can i get the original data that was sent ,i think there's  inbuilt function in java to decode this input without providing any ABI ,but don't know what it is .


texts: How to Import an Online Wallet to Parity?

texts: I wanted to Import my Ethereum Online Wallet (ether.li) to Parity. I created 2 Accounts with the private keys and 1 Wallet with the Wallet Address. How can I transfer my funds to another Wallet (myetherwallet)? Thanks guys


texts: Unable to connect Ethereum Parity node. RPC port: 8545 is open

texts:
I run local Parity node on my Win 8.1 computer and was trying to check how RPC is Working
But it is not working

I tried PostMan:

http://127.0.0.1:8445

Content-Type application/json
Body {"method":"parity_accountsInfo","params":[],"id":1,"jsonrpc":"2.0"}

Get answer: Could not get any response

I tried CURL( like Parity documentation said ):

curl --data '{"method":"eth_accounts","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

get answer error

{"jsonrpc":"2.0":{"code": - 32700, message:"Parse error", "data":null}, "id": null}

What did I do wrong?


texts: Do I need blockchain to connect local database's?

texts:
Hello all and Happy New Year!

My small business and my client use the same vendor application where the vendor application is locally installed at each location. Our client uses barcoding within their business and we use barcoding within our business. But barcoding between each of our databases are not connected (we don't know what their barcode means and vice versa).

I'm thinking..why not connect the two databases through a blockchain db/dapp that will allow just the bare minimum of details so we can know from our clients barcode the client name and maybe a few other details about the item the barcode is attached too.  I don't want to post any private data on a public blockchain from our client. Client name, job title and a number for that item.

Is this an example of where a blockchain dapp would be a good solution?

Thank you.


texts: Why field `data` in `eth_call` optional?

texts:
Based on https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call

The data is optional, but it also says it contains hash of the method signature.

In what scenario you can send a eth_call without data field?


texts:
Something weird happened, and I can't understand what to do now. While migrating the contract to the MainNet, I received this:

$ truffle migrate --network live
Using network 'live'.

Running migration: 1_initial_migration.js
  Deploying Migrations...
  ... <TX_ADDRESS>
  Migrations: <ADDRESS>
Saving successful migration to network...
  ... <TX_ADDRESS>
Saving artifacts...
Running migration: 2_deploy_contracts.js
  Deploying ContractOne...
  ... <TX_ADDRESS>
  ContractOne: <ADDRESS>
Saving successful migration to network...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
insufficient funds for gas * price + value

I've masked the addresses here. On Etherscan, the contract is successfully mined, and is accessible. However, the Dapp Truffle frontend doesn't see the contract. What to do to fix this?


texts: Transfer Failing in Solidity Smart Contract

texts:
I am calling the following function from a front-end on a Solidity smart contract, but it is not transferring the price and commission amounts properly with the call functions, although the ownership of the token is transferred correctly using the safeTransferFrom function. How can I transfer the amounts?
 function tokTransfer(address payable from, address to, uint256 tokenId, uint256 price, uint256 commission) payable external {

    (bool success, ) = from.call{value: price}('');
    require(success, "Transfer failed.");
    (success, ) = address(this).call{value: commission}('');
    require(success, "Transfer failed.");

    this.safeTransferFrom(from, to, tokenId);
 }

Thank you. J


texts: If I use a factory contract to create a new contract, does it show that the factory contract created it in the blockchain?

texts: I am not sure if it would show my address or the factory contract's address (or both).


texts: When should I use calldata and when should I use memory?

texts:
I have seen people use both memory and calldata keywords when writing Solidity. Specifically, they are used when declaring function parameters.

When should I use memory and when should I use calldata?


texts:
The scalability trilemma states that a blockchain can only have two out the following three properties: decentralization, scalability, and security.

Layer 2 protocols aim to make Ethereum more scalable by not always interacting with the root chain. What are the potential drawbacks of layer 2 solutions? It seems to me that by not creating transactions on the root chain you sacrifice auditability, which might be critical for some applications.


texts: Which Protocol is suitable if I want a validated person to authenticate the block?

texts:
I want to create a system in which Every user will have some specific authorities. Like Examination will validate the block containnig Student Marks. Finance should have authority to add block containing Student Fee etc.. For such scenarios which protocol should I go with ? Once the block is added, it should be viewable to all other stakeholders.

Thanks in advance for suggestions.


texts: Cancelled in transaction in metamask and fund no get it back

texts:
I was sending 1 eth on uniswap to another token and decided to cancel because it was too long. After that my 1 eth is never come back, do you know why ?
Thank you for your help.
Baptiste


texts: Retrieving the default token symbol of an Ethereum network via json-rpc

texts:
How can I retrieve the default token symbol of an Ethereum network via json-rpc?
Ethereum would return "ETH"
Ethereum classic would return "ETC"


texts: Solidity Crowdsale contract tutorial: isn't it possible to call safeWithdrawal AFTER the deadline but before calling checkGoalReached?

texts:
I was reading this tutorial: https://www.ethereum.org/crowdsale
The code at the time of writing is this:

pragma solidity ^0.4.2;
contract token { function transfer(address receiver, uint amount){  } }

contract Crowdsale {
    address public beneficiary;
    uint public fundingGoal; uint public amountRaised; uint public deadline; uint public price;
    token public tokenReward;
    mapping(address => uint256) public balanceOf;
    bool fundingGoalReached = false;
    event GoalReached(address beneficiary, uint amountRaised);
    event FundTransfer(address backer, uint amount, bool isContribution);
    bool crowdsaleClosed = false;

    /* data structure to hold information about campaign contributors */

    /*  at initialization, setup the owner */
    function Crowdsale(
        address ifSuccessfulSendTo,
        uint fundingGoalInEthers,
        uint durationInMinutes,
        uint etherCostOfEachToken,
        token addressOfTokenUsedAsReward
    ) {
        beneficiary = ifSuccessfulSendTo;
        fundingGoal = fundingGoalInEthers * 1 ether;
        deadline = now + durationInMinutes * 1 minutes;
        price = etherCostOfEachToken * 1 ether;
        tokenReward = token(addressOfTokenUsedAsReward);
    }

    /* The function without name is the default function that is called whenever anyone sends funds to a contract */
    function () payable {
        if (crowdsaleClosed) throw;
        uint amount = msg.value;
        balanceOf[msg.sender] = amount;
        amountRaised += amount;
        tokenReward.transfer(msg.sender, amount / price);
        FundTransfer(msg.sender, amount, true);
    }

    modifier afterDeadline() { if (now >= deadline) _; }

    /* checks if the goal or time limit has been reached and ends the campaign */
    function checkGoalReached() afterDeadline {
        if (amountRaised >= fundingGoal){
            fundingGoalReached = true;
            GoalReached(beneficiary, amountRaised);
        }
        crowdsaleClosed = true;
    }

    function safeWithdrawal() afterDeadline {
        if (!fundingGoalReached) {
            uint amount = balanceOf[msg.sender];
            balanceOf[msg.sender] = 0;
            if (amount > 0) {
                if (msg.sender.send(amount)) {
                    FundTransfer(msg.sender, amount, false);
                } else {
                    balanceOf[msg.sender] = amount;
                }
            }
        }

        if (fundingGoalReached && beneficiary == msg.sender) {
            if (beneficiary.send(amountRaised)) {
                FundTransfer(beneficiary, amountRaised, false);
            } else {
                //If we fail to send the funds to beneficiary, unlock funders balance
                fundingGoalReached = false;
            }
        }
    }
}

If you look at safeWithdrawal it has 2 checks: afterDeadline and !fundingGoalReached for the first block of code within that function.

If I read this correctly, shouldn't it be possible that if the deadline of a crowdsale using this contract is passed, you could call safeWithdrawal() as a participant in the sale, before checkGoalReached is called and get a refund of your funds and still keep the tokens?

The reason why I'm suspecting this is because if checkGoalReached is not called, the fundingGoalReached remains false, and the deadline is passed.


texts:
I've forked uniswap V2 to xDai and deployed its interface & analytics. Interface seems to work well, but when you visit analytics, it never loads.
Here's subgraph - https://thegraph.com/explorer/subgraph/cyberswap-dex/uniswap-v2
Here's site - https://cyberswap-info.netlify.app
Look at console and you'll see only 14 fetches are made. After that, it's stuck. I don't know what's causing this.
If I change factory & subgraph links and point it to Honeyswap, site loads fine.


texts: How to detect anyone buy how much my tokens

texts:
Scenario: User will signup on my website example.com and then they need to buy my tokens to use my website so I have created my own ERC20 tokens(ShahzadTestCoin), but my problem is how can I detect someone buy how much token using javascript or php code? Is there any api which will inform me that some user has purchased tokens?

Also I need to save how much tokens are keep each user in my own database, would it be good idea?

My tokens address:
https://ropsten.etherscan.io/address/0xc61bec3497e549b9fa58ae79a5a573e064fe3311

Please give some better advise


texts:
I know that exist a frameworks for only develop Dapps and are specially focused in the blockchain development. For example: Truffle, Embark, etc.

But my question is if is good or not develop dapps with other frameworks (baseds on node.js), who actually are used for develop normal apps, but using the web3js API  for interact with the ethereum blockchain. For example using: Sails.js, Koa.js, etc.

Any one have experience with this? Some tip or recomendation?


texts: Accessing funds that are sent to the smart contract address

texts: If someone creates a smart contract (and is owner of that contract), is it possible for that person to collect ETH and other tokens, that are sent to the address of smart contract?


texts: Initialize Metamask from front-end use of Nodejs

texts:
Building a simple ERC-20 Token payment screen for a simple shopping cart. I am having an issue figuring out how to use Metamask to allow others to make secure payments. As we dont have access to other users private keys, I must use Metamask as a helper for allowing payments. Nodejs being server-side, doesnt have access to Metamask. So does anybody know how I would go about prompting Metamask to sign and submit a transaction from a Nodejs view. JS script on the view page?

Any help would be appreciated, thanks!


texts:
I am building a lotery with one game per day on Ethereum but I need to know what is time zone is the transaction date in Solidity.

Is it gmt+0?


texts:
I'm trying to mine test either on a private testnet using geth on windows 7, but do not appear to actually be mining anything.  Geth seems to stall indefinitely after checking the DAG for epoch 0, while consuming 100% of my CPU. Ran it overnight in this state with no progress.

This is the command I'm using to start geth:

  geth --identity "Anon" --rpc --rpcport "8080" --rpccorsdomain "*"
  --datadir "G:\EthTest" --port "30303" --nodiscover --rpcapi "db,eth,net,web3"
  --networkid 1999 console init genesis.json

The difficulty in my genesis block is "0x200"

I have tried allocating myself ether in the genesis block like this, and I still do not appear to have any test ether:

  "alloc": {
      "0xmy_account": {
          "balance": "10000000000000000000"
      }

Thanks!


texts:
I'm running Parity 1.9.2 - sync'd quick, in about 15 hours.
Now I'm trying to use it with my Ledger Nano to sign some dApps (MakerDAI).
I've installed the Parity extension for Chrome, it's showing green (connected to Mainnet).

I connect my Ledger and Parity recognizes it. It's showing up in the Accounts page - it's also showing as connected.

I'm just trying to enable some of the permissions shown on the DAI Dashboard page. I click a slider, which prompts Parity to open a signer window in the bottom right corner of the screen. It's asking me to give permission to sign the transaction. I change the gas price to what I want it to be, then click on the acknowledge button... at this point my Nano should show me the transaction and ask me to approve it - this never happens.

I click the acknowledge button multiple times in the signer window but nothing ever happens on my Nano.

Did this break somewhere along the way? This has worked for me in the past on a previous version of Parity.

Is this a known issue? Any suggestions?

Thanks.


texts: Incorrect Values for total supply/distributed amount

texts:
I am working on releasing a token on Eth and have been tinkering with some code to allow the token to be claimed via people sending 0 eth to the contract address.

So far I have managed to implement the airdrop function and set the details of the token etc.

What I am having problems with is the fact that when I execute the contract I am getting, for example, 3m tokens sent to the creation address (which is what I want) and a further 3m tokens which are sent to 0x00000000000000 - I do not know why I am seeing the second 3m being sent elsewhere.

When I try and counter this problem by generating more then I wish and burning the remaining supply the interaction fails (probably due to the number of tokens in supply etc) and I am struggling to address where the issue is.

I am a basic coder and have copied most of this contract and amended where I can this part just has me stuck.

I basically want a token which has a 28m total supply, 3m sent to the creator and 25m to be left for people to claim via the airdrop function.

as it is I have a total supply of 28m, 3m sent to the creator and 3m essentially vanishing upon creation which gives me a total supply of 25m although the contract states 28m total supply.

[
{
    "topic": "0x8940c4b8e215f8822c5c8f0056c12652c746cbc57eedbd2a440b175971d47a77",
    "event": "Distr",
    "args": [
        "fd2b03d644df375f96cda053790e013e12a621a2",
        "3000000000000000000000000"
    ]
},
{
    "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
    "event": "Transfer",
    "args": [
        "0000000000000000000000000000000000000000",
        "fd2b03d644df375f96cda053790e013e12a621a2",
        "3000000000000000000000000"
    ]
}

This is the log which I get when I execute the contract in remix.solidity, my guess is the problem lies with either this:

    function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) {

    require(_to != address(0));
    require(_amount <= balances[msg.sender]);

    balances[msg.sender] = balances[msg.sender].sub(_amount);
    balances[_to] = balances[_to].add(_amount);
    Transfer(msg.sender, _to, _amount);
    return true;
}

This:

    function distr(address _to, uint256 _amount) canDistr private returns (bool) {
    totalDistributed = totalDistributed.add(_amount);
    totalRemaining = totalRemaining.sub(_amount);
    balances[_to] = balances[_to].add(_amount);
    Distr(_to, _amount);
    Transfer(address(0), _to, _amount);
    return true;

    if (totalDistributed >= totalSupply) {
        distributionFinished = true;
    }
}

or this:

    function distribution(address[] addresses, uint256 amount) onlyOwner canDistr public {

    require(addresses.length <= 255);
    require(amount <= totalRemaining);

    for (uint i = 0; i < addresses.length; i++) {
        require(amount <= totalRemaining);
        distr(addresses[i], amount);
    }

    if (totalDistributed >= totalSupply) {
        distributionFinished = true;
    }
}

If anyone needs more info please do let me know and I appreciate any help.


texts:
I have a contract which needs to be updated occasionally.

So I create a transaction, sign it and send it to the network.

When I do that, I state a gas-price.

The higher the gas-price is, the faster the transaction should execute, since miners normally choose higher requests first, in order to optimize their profit.

However, an idea came to me.

I suppose I'm not the first one, but I'll ask it anyway:

Why shouldn't I set up a miner account, which would mine only transactions with the lowest gas-price possible - 1 wei?

Then, I shall submit all of my contract-update transactions with a price tag of 1 wei.

Should some other miner catch them first (for some odd reason, because who would want to work for such a low price), I will end up paying 1 wei to that miner.

If I catch them first, the I gain back the 1 wei that I've spent.

In either case, I end up spending very little for updating my own contract (and a little more for server time, but I'm paying for that anyway since I need that Parity node up and running).

Is there any downside that I'm missing here?

Thank you very much!


texts: Problem transferring ether to contract (Error: transact to EtherInteractionTest.deposit errored: VM error: revert)

texts:
I'm trying to test a simple contract to deposit and withdraw ether in remix.

Code:

pragma solidity ^0.4.17;

contract EtherInteractionTest {
    function withdraw() public {
        msg.sender.transfer(address(this).balance);
    }
    function deposit(uint256 amount) payable public {
        require(msg.value == amount);
    }

    function getBalance() public view returns (uint256) {
        return address(this).balance;
    }
}

Error:

This is the error I get:
transact to EtherInteractionTest.deposit errored: VM error: revert.
revert  The transaction has been reverted to the initial state.
Note: The constructor should be payable if you send value.  Debug the transaction to get more information.

Remix screen:

Thank you for your help!


texts:
When a transaction is transmitted on the blockchain, where does it go exactly?
where is the transaction pool, where is it saved?
How do the miners know that a new transaction is launched on the blockchain network?
Cordially


texts: Using Coinbase ETH Wallet to save contracts/send transactions with web3

texts:
I am working on a node app where I am using web3, Infura & truffle-hdwallet-provider & a new MetaMask wallet. This process appears to work & I can successfully deploy contracts!

I want to know if it is possible to deploy contracts & send transactions with a Coinbase ETH account (instead of my new MetaMask one)?

The truffle-hdwallet-provider package requires a mnemonic to authorise the wallet, but, is this possible with a coinbase account I cannot seem to see this or a private key in my dashboard?

One post I have found touches upon this where they suggest it's possible if I "unlock" the account using a password, which is insecure if using a http "provider"
Judging from the warnings regarding unlocking accounts, I think I should avoid this method
If I was to simply use a https provider, would this be suitable or still insecure & undesirable for production?

If I were to use this method, would the password for my Coinbase ETH Wallet simply be my account password?

I appreciate I have asked a few questions here.


texts: Is this function good enough to refund ether or this security flaw?

texts:
I mean:

function refund()
 {

 if (msg.value < 1 ether)
 {

   msg.sender.send(msg.value);

    return;

  }

I'm probably wrong but this looks as if .send will drain the money in the contract if any without checking if msg.sender had contrributed? Shouldn't this check balance first + contributed and if so: how to do it?

I saw this tutorial somewhere but can't be 100% sure it's the correct way?


texts: Deployment to Ropsten via Infura Exceeds Gas Limit

texts:
I have encountered the Exceeds Gas Limit problem back when I was deploying to my local Ganache. I had to refactor my contracts and break it apart to several contracts. I got it to work.

Now, I'm encountering the same when trying to deploy to Ropsten via Infura.

I'm getting the Exceeds Gas Limit even when just deploying Migrations.sol. I have enough gas in my primary account.

My Truffle config is this:

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

var infura_apikey = "... ...";
var mnemonic = "... ... ... ...";

module.exports = {
  networks: {
    development: {
      host: 'localhost',
      port: 8545,
      network_id: '*' // Match any network id
    },
    ropsten: {
      provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/"+infura_apikey),
      network_id: 3
    }
  }
}

Initial Migration JS is standard code.

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

module.exports = function(deployer) {
  deployer.deploy(Migrations, { gas: 4700000, //may be 21000 - 3000000
gasPrice: 20000000000});
};

What am I missing here? It is failing during initial migration.

Using network 'ropsten'.

Setting gas to 4,700,000 seems to be low. (How can this be? This is just the Migrations contract!)

Running migration: 1_initial_migration.js
  Deploying Migrations...
  ... 0x6810b697ecf938b94a134ed62865b661dcd5f37ae53bd08dc575b8850de968ef
  Migrations: 0x64e70064a0b59f8d2b789f7cb50e6a9465abaf35
Saving successful migration to network...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
exceeds block gas limit

Setting it to 4,800,000 seems to exceed Ropsten's limit.

Running migration: 1_initial_migration.js
Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful
transactions manually. exceeds block gas limit

UPDATE

Eventually I gave up developing on Ropsten, and worked on Rinkeby instead. I didn't have such problems anymore.


texts: Problem on returning fields of a struct inside a mapping

texts:
I have the above code

 mapping(string => Owner) public Owners;

    function addOwner( string memory name, string memory surname, string memory fathername, string memory mothername, string memory ethnicityId, string memory id) public returns(int8)
    {
        Owner memory owner;
        owner.name = name;
        owner.surname = surname;
        owner.fathername = fathername;
        owner.mothername = mothername;
        owner.ethnicityId = ethnicityId;
        owner.id = id;

        Owners[id] = owner;
        return 0;
    }

    function getOwnerName(string memory id) public returns(string memory, string memory) {
        Owner storage owner = Owners[id];
        return (owner.name, owner.surname);
    }

I am inserting an Owner with addOwner and try to retrieve with getOwnerName but Ringeby network is not returning the data I have inserted. The function returns the right data when I use the javascript VM on remix IDE


texts: How would you install the Ethminer without sudo access?

texts:
I am trying to get Genoil's Ethminer installed on a machine without sudo access. The Github instructions require some packages to be installed.

sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

I got a person with sudo access to install these, but only from the official Ubuntu 16.04 repositories, i.e. without doing the step described in the instructions where an additional repository is added. He's reluctant to do so and also to give me sudo.

When installing the Ethminer the same way I installed it on my home PC (And it worked btw), during compilation I get the error saying my CryptoPP is 5.6.1 version, but 5.6.2 is required.

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ctest path: /usr/bin/ctest
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find CryptoPP: Found unsuitable version "5.6.1", but required is
  at least "5.6.2" (found /usr/include)
Call Stack (most recent call first):
  cmake/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindCryptoPP.cmake:107 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/EthDependencies.cmake:44 (find_package)
  CMakeLists.txt:246 (include)

After this, I downloaded it and started compiling CryptoPP myself by following the first few steps in this guide.
This worked and the tests ran successfully. The library is now in my home folder. The problem is, I have no idea how to build the ethminer by making it use that library in my home folder, rather than the /usr/include/cryptopp folder. When I type

cmake -DBUNDLE=miner ..

It still comes up with the same error, because (obviously), it isn't aware of the library I compiled from source myself. How do I make it aware or is there an alternative?


texts: calculate exchange rate of WBTC TO WETH in big numbers

texts:
i want to calculate how much WETH i will get for a given WBTC amount:
const amountsEth =
        kyber
          .methods
          .getExpectedRate(
            addresses.tokens.wbtc,
            '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
            AMOUNT_WBTC
          )

console.log(amountsEth.expectedRate) [o]: 36424763500125748950
consol.log(AMOUNT_WBTC) [o]: 1200000000

can you help me to understand how i calculate the amount of eth i will get in big numbers pls


texts: How does the contract TwitterHumanityApplicant queries the Twitter API?

texts:
TwitterHumanityApplicant is (as I understand) a smart contract that validates that a human (or a Twitter user) owns a wallet.

I was expecting to see in the contract code something that resembles a call to the Twitter API to find a tweet by the user that includes the wallet address. I couldn't find anything that looks like an API endpoint. Maybe I missed it, as I am very new to Solidity.

How does this contract checks that the Twitter account owner tweeted the wallet address?


texts: How the end user use the decentralise applicaton?

texts:
I am new to ethereum blockchain. I created a decentralise application for token sell.I deployed it smart contract into Rinkeby test network.I also hosted it into github pages.When end user use it application so,it is necessary to use Meta-mask extension for web3 provider to connect application to ethereum block-chain.

So,One question in my mind,when we create decentralize applications.Is is necessary to use metamask who use decentralise application??

And if end user not use metamask.How transaction and dapps connect to the blockchain.Can we create custom web3 provider like metamask. So end user not use metamask when he/she use decentralise application??

It might be a silly question but here i want to understand this concept more deeply.

Please help to clear my above query.

Thanks


texts: What tokenized assets can be stored on-chain?

texts:
Examples of digital assets that can be tokenized as NFTs are:

crypto art (.jpg or .png file stored off-chain)
game weapons or characters

Examples of physical assets that can be tokenized as NFTs are:

a house
stocks
car

All of the above are stored off-chain. That is, not even the tokenized digital assets are usually stored on the blockchain due to costs incurred, just like how a house and car cannot be stored on the blockchain.
What other digital and physical assets not listed above can be tokenized that actually can be stored on-chain economically?


texts:
Is there a way in Solidity to call super class external functions?
Normally with inherited contracts, when overriding inherited functions you can also call the original function logic with super.functionName().
With external functions, the only way to call them within the contract that defines them is with this.functionName().
Now what if I wanted to override an inherited external function and call the super class function, how would I achieve this if possible?
contract Foo {

    // I want to call this from the contract that inherits it
    function do() external virtual public {
         // nothing
    }
}

contract Bar is Foo {
    function do() external public override(Foo) {
        super.do() // TypeError: Member "do" not found or not visible after argument-dependent lookup in contract super Bar.

        this.do() // revert

        this.super.do() // Want to do something like this
    }
}


texts: parity - Computer wiped clean. How to bring parity back with my coins?

texts: I've got some RLC coins in my parity wallet/node but computer was wiped clean. How to bring it back. I've saved the 16 different number & letter combinations.


texts: Finding Wallet Password Using Known Private Key

texts: I have a bit of an odd question, I have two wallet files that I encrypted a few years ago, both of them have the same password, I have the private key for one of the wallet json files (MEW structure). I know it's unlikely, but is it possible for me to identify the password of the wallet using the private key when I have that alongside the wallet.json containing the ciphertext, salt and other relevant info?


texts:
I have one mapping initialized before constructor.

mapping(address  => uint) TokenValsByAddress;

This mapping stores 10 addresses.
After some operations , I got new mapping with same 10 addresses of TokenValsByAddress and new 2 address.

mapping(address  => uint) NewMapping;

Now I want to assign NewMapping to TokenValsByAddress.

I get an error when I do below assignment.

TokenValsByAddress = NewMapping;

  Error : Mappings can not be assigned to.

What should I do to update TokenValsByAddress  ?


texts:
So I was implementing a trading contract and need to keep a list of products on sale. I was using arrays but later switched to mappings.

So arrays implementation:

uint[] public productsOnSale;
uint public totalProductsOnSale;
// array of product to its position
mapping(uint => uint) productToIndex;

while sale can be achieved using

uint public totalProductsOnSale;

mapping(uint => uint) indextoProduct;
mapping(uint => uint) productToIndex;

Since in case of arrays we keep track of values at any index, we can achieve that using mapping as well.

Are there any downsides of using mappings instead of an array? In terms of computation time or in terms of cost (gas)?


texts: what happens when we shut down the nodes of a private ethereum network?

texts:
I created a private network using Microsoft-ethereum consortium template with 2 mining nodes and 1 transaction nodes on azure which are linux machines.

After a period of time I shut downed all the 3 nodes, started all the machines again.

After starting i started the ethereum node using start-private-blockchain.sh with geth.cfg and password.

Node started sucessfully.

Now when I try to access my previously created contracts with the previous address availble I am not able to access the contract?

What is the issue here?  Is the data about the contract lost when the machines are shut downed or the mining nodes are not connected to the transaction nodes during the node initialization?

Or is it entirely different issue? I didn't do any thing specifically for associating mining nodes when starting my private network.


texts: Very confused. Seem to have lost my private key?

texts:
I created an Etherwallet today and printed out a hard copy. I also physically wrote down both my address and private key for security purposes. I carelessly transferred coins from Etherdelta to the address I had written down. I now notice that it was NOT the address attached to my private key. I don't know where the private key is to this address, but the money is sitting there.

Any ideas on desperate recovery moves here?


texts: how to get the list of tokens that are specific to my requirements

texts:
Some of the tokens, have the weird approve methods. Meaning that they tried to mitigate front-running. https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit
I am trying to find the list of token addresses that follow the above... Is there any way I can parse etherscan or something like this to grab those token addresses ?


texts: Which password does Mist require when sending from the presale wallet?

texts:
Yesterday I was able to import my presale ether into my wallet and the balance now shows in the Ethereum Wallet.  However, whenever I try to send and it asks for my password, it says "wrong password".  How can I resolve this issue? I've restarted the computer with no luck, and I've tried all the passwords I can imagine, including the one for the presale wallet.

I've since tried to deposit into Kraken with https://www.kraken.com/ether/ and getting "Deposit failed: Invalid sender" after hitting "Deposit to Kraken". I imagine that is because the ether is now in my wallet and not in the json file, right?

Any advice would be appreciated.  Thanks.


texts: How to verify Mist's standard multisig wallet using Etherscan tool?

texts:
I've found standard Mist wallet contract code, thanks to another answer.

I am trying to verify this contract over and over using different compiler versions but verification fails. Can somebody point me what am I doing wrong?


texts:
"web3": "^1.0.0-beta.37"

"web3": "^1.0.0-beta.55"

import {Miner} from 'web3-eth-miner';

then

  const options = {
        defaultAccount: "0x78dB3e2129D58685444989dD9682DDDC70dd3C82",
        defaultBlock: 'latest',
        defaultGas: 1,
        defaultGasPrice: 0,
        transactionBlockTimeout: 50,
        transactionConfirmationBlocks: 24,
        transactionPollingTimeout: 480,
      }
      const miner = new Miner("http://127.0.0.1:9545", null,options);
      console.log(miner); miner.start(2);

miner.start() says that it is not a function()...
ref : https://web3js.readthedocs.io/en/1.0/web3-eth-miner.html


texts: Trying to sync my wallet is actually making me depressed

texts: I really don't understand why it's so bad. I got geth light set up via terminal (because it was impossible to download blocks) by following the instructions in another thread and the blocks downloaded nice and quick. Yet the chaindata just kept going forever with an infinitely never ending bar with the overall umber always rising. What really upset me is when I tried restarting after a whole day of waiting it just started downloading the chaindata from the very beginning. Can someone advise if there is any option to have my wallet on my computer (not on a website) and fully functioning please?


texts: what is the mining of block reward at Etherscan?

texts:
When I searched out some block on Etherscan, I found out some strange thing.

For example, here is one of example: https://etherscan.io/block/9168614

Reward of this block is 2.18430490432165812 Ether (2 + 0.12180490432165812 + 0.0625)

2 ETH is mining reward and 0.12180490432165812 ETH is sum of tx fee.

Then what is 0.0625 ETH?

It seem that the value is not reward for uncles


texts: Ethereum performance when fetching transactions from blocks

texts: I need to fetch the completed transactions from the ethereum blockchain ledger. At the moment I am retrieving individual blocks in order to fetch the transactions using web3.eth.getBlock synchronously. However this is taking a long time (around 25 secs to fetch transactions from 40 blocks in my case where the nodes are deployed on Azure). I understand that I could asynchronously fetch the transactions using multiple threads and then arrange them based on timestamp. But is there another way to optimize performance, so that transactions could be fetched synchronously as well?


texts: What is integer overflow and underflow and how it can be possible? I saw its example that coders avoid this bug by require(balanceOf(_to) +_value >= balanceOf(_to))  where _value is an unsigned integer so it will always be positive and will add to the balance, so this is an understood thing so why is this condition needed?


texts:
Assuming that I don’t know the contract A, I just know its address, and that it has a setNumber method that I want to call it from contract B.

I want to call the function setNumber in contract A, using the method callsetNumbercontractA in contract B.

How to reproduce:

Deploy both contracts
Copy contract A address and use the function setcontract in contract B
Now try to use the function callsetNumbercontractA in contract B

It will fail and I can't get why.

pragma solidity 0.5.12;
contract A {
    event lmao (string);
    uint public x;
    function hello () public {
        emit lmao ('YES');
    }
    function setNumber (uint n) public {
        x=n;
    }
}

pragma solidity 0.5.12;
contract B{
    address public to;
    function callcontractA () public {
       to.call(abi.encodeWithSignature("hello()"));
    }
    function setcontract (address x) public{
        to = x;
    }
    function callsetNumbercontractA () public {
        // I wanna set var x (in A) to 10
       to.call(abi.encodeWithSignature("setNumber(uint)",10));
    }
}

Ropsten transactions:

callcontractA's 3rd event log “yes”
callsetNumbercontractA`


texts: web3js: Can I send a signed Transaction without wait the result?

texts:
Commonly, I dow

const receipt = await web3.eth.sendSignedTransaction(web3, signed_transaction);
console.log("tx_hash:", receipt.transactionHash);
console.log("gas_used:", receipt.gasUsed);
console.log("gas_price:", offered_gas_price);

But I do not want  (no more) to get the return output, because it's too slow.

So I started a nodejs server to listen to contract events, and it works.

No, how can I call web3.eth.ssendSignedTransaction without wait for result?

I simply tried to call

web3.eth.sendSignedTransaction(web3, signed_transaction);

But I discovered that nothing is happening at all against my contract.

Should be a js problem only.
But, in case no, can I simply send a transaction and ignore esit?

how?


texts: Can we just increase block gas limit and decrease block time to raise TPS?

texts:
Given transaction gas limit (TGL), TPS = block gas limit (BGL) / TGL / block time (BT). But we don't increase TPS by simply raising BGL and decreasing BT. What's the downside exactly? Bigger BGL leads to mining centralization and shorter BT larger uncle rate?

Edit: "What are Ethereum performance dynamics?" talks about mining difficulty, not centralization or TPS.


texts: Transfer ERC20 via onother smart contract (call transfer as delegate)

texts:
I want to deposit erc20 tokens to a smart contract. But when I just send it to he address, I can't handle the deposit. So I tried to use the delegatecall function to do the transfer.
Basically I thought of something like deposit(uint amount) and the contract then handles the transaction.
I used this example to test if the delegatecall works. The transferTo function should send the token from the sender to addr, but the function fails:
contract TokenInterface {
function transfer(address _to, uint _value) public returns (bool success);
}

contract New {
    TokenInterface private token;
    constructor(address tokenAddr)public{
        token = TokenInterface(tokenAddr);
    }

    // This is just for testing. address(...).call(...) works fine
    function echoBalance(address addr) public returns(uint balance){
        (bool success, bytes memory result) = address(0x92...4f).call(abi.encodeWithSignature("balanceOf(address)", addr));
        return abi.decode(result, (uint));
    }

    // but address(...).delegatecall(...) fails. Same when replaced by call
    function transferTo(address addr, uint amount) public returns(bool success){
        (bool success, bytes memory result) = address(0x92...4f).delegatecall(abi.encodeWithSignature("transfer(address,uint)", addr, amount));
        return success;
        //return token.transfer(addr, amount); // only transfers from this smart contract to addr, but not from sender
            // addr would be the smart contract itself in the deposit scenario
    }
}

The code is partially based o this post:
ERC20 token withdrawal from smart contract
I tried it in remix.ethereum.org.
When I understand it right, .call should send the token from the contracts address and .delegatecall should send it from the msg.sender address.
The best way would be to use something like token.transfer(addr, amount) but with senders address instead of the contracts address. Is this possible?
If not: how can I make the address(...).delegatecall(...) work?
Or is this scenario handled in another way?
I know that it can be done by using transferFrom but this requires an additionnal approve action by the caller, which I'd like to avoid.
EDIT:
I found out, that delegatecall does not what I thought it would.
Is is possible to use one contract from another and act like the user who called the function, at all?
If not: Is it possible to do what i want to do?


texts: Are there a standard for generating a unique thing to send to the smart contract?

texts: Are there anything that is unique maybe combine with time, user address or something else, and send it to the smart contract, and the contract can know that it is indeed the unique thing that user doesn't not tell a lie?


texts: Insufficient fund for sending USDT token on an address with no Ether

texts:
I've an Ethereum account in Geth which has received 4 Tether (USDT). I want to send 1 of them for test to another account, but I receive this error:

insufficient funds for gas * price + value

I think this is because there is not any deposited Ether in the source account. If I am right, how can I solve this issue?
My customers on this platform should be able to receive and send Tether, and I can not enforce them to have a deposit of Ether too.


texts:
I am trying to upload 350 transactions one by one to Rinkeby using light mode geth and it is slow even I use a high gas price. However, I saw research paper claim they were able to complete the transactions at 15 seconds each.
Any possible solution to achieve what the research paper achieved?
The paper is Blockchain based searchable encryption for electronic health record
sharing by Lanxiang Chen.


texts: How to use erc20 token in integer, not decimal

texts:
I want to use number as normal integer, not in decimal.
For example, when I use uniswap function IUniswapV2Router02Instance.methods.swapETHForExactTokens(1, , , ).send() in my project, an argument integer (1) is recognized as decimal (0.000000000000000001) .
This is the transaction on etherscan.
https://ropsten.etherscan.io/tx/0x14d16174a7b12c1a77356b60b1fca7385c7cad583991d70b8a4423faf6198e43
Does anyone know why this problem happens and how to solve, please?


texts:
I have a problem. Few days ago, I could send transaction but now I can't.I don't understand why.I hope someone will help me. Just get hash, no receipt, no confirmation.

geth

geth --fast --rpc --rpcapi db,eth,web3,net,personal --ws --wsapi db,eth,web3,net,personal --wsport 8546 --wsorigins "*"


texts: multi-sig transactions, not on contract-level

texts:
Is it possible in Ethereum to issue multi-sig transactions which are not implemented on smart contract level but instead via signing, similar to Bitcoin?

The following would be an example of a multi-sig transaction - might work in practice differently, just for sake of argument:

signature1 = sign(privateKey1, message);
signature2 = sign(privateKey2, signature2);

Background + Motivation: I am doing a thought experiment whether or not it makes sense to block transactions that have code associated (instead of being private key-controlled). E.g.: If one issued a centralized-fiat-token and wants to ensure KYC-compliance, one might want to only allow these centralized-fiat-token to be sendable to and from KYC-approved addresses. However, these addresses could actually be controlling a multi-sig wallet or even be a proxy contract that gives other non-KYC-compliant parties access to these tokens. To prevent that, one could limit transferrability to only approved addresses that do not have any associated code.

[This is obviously a bad idea because, 1) e.g. the mist wallet is/was a code-controlled wallet and as such be locked-out, 2) I might want to move funds to another account that I control myself, without undergoing (parts of) the KYC procedure again.]

If we could show that multi-sig transactions are anyway possible even without code in multi-private-key scenarios, then the whole argumentation of blocking code-controlled addresses would break down.


texts: Start Mining Operation = null (cannot mine private eth chain)

texts:
not sure if anyone has seen this before: I'm trying to mine a private chain.  For whatever reason, after I was able to mine two blocks, I tried to mine the chain again and I get the following...(below)...any ideas to troubleshoot?  TIA.  JD

> miner.start(1)
INFO [07-03|19:18:00] Updated mining threads                   threads=1
INFO [07-03|19:18:00] Transaction pool price threshold updated price=18000000000
INFO [07-03|19:18:00] Starting mining operation
null
> INFO [07-03|19:18:00] Commit new mining work                   number=3 txs=0 uncles=0 elapsed=104.511µs


texts:
Péter Szilágyi, in his talk in Taipei, claims that totalDifficulty can be spoofed:

https://www.youtube.com/watch?time_continue=575&v=qJA6J0mP73w

How is that possible? Can the variable only be verified if all block headers are downloaded from the spoofed chain and would that produce a fraud proof?


texts:
I'm aware how we can make an externally owned account:

e.g. in geth use: "geth new accounts" in MyEthereumWallet, we put a password and it generates address and private key.

Wha about a contract account? In geth when I deploy my contract it returns an address of the contract. Can I generate the address and account first and then deploy the contract?

Question: How to generate a contract account in Ethereum?


texts: What is BigchainDB and how can it be used with Ethereum?

texts:
BigchainDB says:

  It is complementary to decentralized processing platforms like
  Ethereum.

In the Blockchain Stack it suggests that the Ethereum "decentralized processing" is above the File System and BigchainDB.

How can BigchainDB be used in Ethereum?  Will Geth be able to use BigchainDB?  Given BigchainDB keeps repeating "One Million Writes per Second" is that the same as transactions per second?  Is scalability with tx/second then solved?


texts:
Is it possible to use several mobile phone GPU to mine Ethereum?
Advantages are

Less power consumption and
No fan and robust material

Mobile phones do not have much memory, but if a manufacturer like Qualcomm made one just for mining will this run or not? Is this a good idea?


texts: What's the difference between developer mode and testnet?

texts:
I just tried running geth in developer mode on testnet.

 ~ $ geth --dev --testnet
F0127 21:07:16.947591    6407 flags.go:467] dev and testnet are mutually exclusive

I wasn't aware of the actual meaning behind the dev flag, from the help:

--testnet   Morden network: pre-configured test network with modified starting nonces (replay protection)
--dev       Developer mode: pre-configured private network with several debugging flags

What's the deal with the developer mode? What debugging flags are available? And what's the difference with the morden testnet?

I want to start developing smart contracts. Which is the best one to choose?


texts: Can a smart contract know which address sent it an ERC20 token?

texts:
I want want to be able to send an ERC20 token to a smart contract and be able to track which address sent the ERC20 token and for what amount. For example, an address sends X tokens to a smart contract and once they make the transfer the address can now run a function in the smart contract to say register a domain name. Said function would not be able to run without the deposit of the ERC20 token. Note there are two smart contract calls, one to transfer the tokens, and one on the smart contract receiving the ERC20 token.

When I read the ERC20 Solidity smart contract code I see a mapping of balances. I do not understand how I can track who sent what amounts.


texts: Does running a buggy function stops hole contract from work?

texts: Does running a method in a contract that has a bug in it, stops other methods of contract from doing their work? I mean in other programming works , when a buggy method runs the hole program will crash(except if programmer handle that). Does this happen to ethereum smart contracts?


texts: For a simulation, I'm interested in collecting some data about the ethereum network. Especially propagation time and block times (as seen on ethstats.net). Is there an API that I can use for this purpose or do I have to go the web-scrapping way?


texts: How to interact with any ERC20 in a smart contract?

texts:
How can I interact with various tokens with my deployed smart contract? I want to be able to receive tokens, count them, and perform logic based on the aforementioned events.

I tried using the ERC20 standard function, Transfer, but cannot figure out how to specify which token is being delivered. I assume, at some point, the address of the ERC20 will need to be included in the function.

In looking at this answer, I get some insight.

Would using ERC223 be the answer here?


texts: Can I replicate ethereum transaction knowing hash/input data?

texts:
I found puzzling transaction that I would like to replicate or understand how its done. Can it be done from the hash/input data?

https://etherscan.io/tx/0x4a7c5c53af00834b33db5a5d4e3a1f75c6a36125dd5bc514e6f8249a644725d2


texts: ELI5 How does a Merkle-Patricia-trie tree work?

texts: I understand that Merkle tree are Hashes of Hashes, they have the advantage that you can verify only a subtree. But what about Patricia? What does a trie mean? And how is it used in Ethereum?


texts: What size is an enum member inside of a struct

texts:
Let's consider the following code:

pragma solidity ^0.4.18;

contract Test {
  enum EnumTest {
    Test0,
    Test1
  }

  struct StructTest {
    EnumTest Foo;
    uint256 Bar;
  }
}

Not taking into account struct tight packing, what is the size of the member Foo inside StructTest? Does it depend on the number of members in the enum EnumTest?


texts: Getting list of token holders in real time

texts: I want to get a list of token holders. Etherscan currently does this, however it is days behind and is very slow to update / reindex the token holder list. How can I get a updated list of token holders that is fairly recent? What tools or APIs can I use to accomplish this? Thanks.


texts: Is Merkle tree applicable at block level also?

texts: As per my understanding, Merkle tree is applied in case of transactions. Through Merkle tree we generate root hash transaction from all the transaction present in a block. So does it work the same way for block as well like there is a root hash block generated from all the blocks.


texts: Running out of gas during a deploy due to a large number of require() statements?

texts:
I have a smart contract that has a fair number of functions, but a large number of require() statements because I carefully check every incoming parameter and some intermediate calculation results too.  I've been fighting an out-of-gas error during my Truffle 5.0 beta migrations for a long time now with this contract.

On a hunch, I did a search-and-replace throughout the contract that commented out every require() statement.  The out-of-gas error went away and I could deploy successfully.

If I use the solc optimizer I can deploy successfully with the require() statements intact.  But then I can't use the Truffle debugger since currently it can't coexist with optimized code, and I really need the debugger.

I thought it might be due to the long strings I was using as my "revert messages" for the require() statements, so I radically cut down their size, but the error still occurred.  Then I tried changing them all to empty strings but still got the error.  It really appears to be the sheer number of require() statements that is causing the out-of-gas error but only when I don't use the optimizer.

Has anyone experience this and can suggest a technique to get the gas low enough that I can deploy.  Note I am sending an extremly high amount of gas with my migration, just below the Block Limit for the Ganache client.

2_deploy_ebb.js
===============

   Replacing 'EtherBandBattlesManager'
   -----------------------------------
Error:  *** Deployment Failed ***

"EtherBandBattlesManager" ran out of gas (using a value you set in your network config or deployment parameters.)
   * Block limit:  100000000
   * Gas sent:     99999999

    at ./.nvm/versions/node/v8.11.1/lib/node_modules/truffle/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Truffle v5.0.0-beta.2 (core: 5.0.0-beta.2)
Solidity v0.5.0 (solc-js)
Node v8.11.1


texts: I have deployed my smart contract but i am unable to interact with it using truffle

texts:
MY ChainList.sol code

pragma solidity ^0.4.23;

contract ChainList  {

  struct  data  {
    uint   ownernumber;
    uint   id;
  }

  uint value;
  mapping (uint256 => data) public  datamatching;

  function storedata (uint _ownernumber, uint _id) public {
    var  persondata  = datamatching[value];
    persondata .ownernumber = _ownernumber;
    persondata. id  =  _id;
  }

  function getData(uint256 userId) returns (uint, uint){
    return (datamatching[userId].ownernumber, datamatching[userId].id);
  }
}

// deploying  contract in using migrations

var ChainList = artifacts.require("./Migrations.sol");

module.exports = function (deployer) {
  deployer.deploy(ChainList);
}

// My trufle.js code

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" // Match any network id
    }
  }
};

i am have deployed succefully

Compiling ./contracts/ChainList.sol...
Compiling ./contracts/Migrations.sol...

Compilation warnings encountered:

/

home/mdvenkatesh/Desktop/asset/contracts/ChainList.sol:14:5: Warning: Use of the "var" keyword is deprecated.
    var  persondata  = datamatching[value];
    ^-------------^
,/home/mdvenkatesh/Desktop/asset/contracts/Migrations.sol:11:3: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.

**Running migration: 1_initial_migration.js
  Deploying Migrations...
  ... 0x942947d411cc40c214ee717f12a8626033aea99b9db0cfda2189a8c214c0d068
  Migrations: 0x4d838fd69456fcb2c4c49b1b05c8ae7b7205cde5
Saving successful migration to network...
  ... 0x20659b7fdf1ac7c4a1899be68938297b5fb1cae318024c61eee7886d007d134d
Saving artifacts...
Running migration: 2_deploy_contracts.js
  Replacing Migrations...
  ... 0xe287e9ccbe891349ca0a2b1bac64a1291558b3817a6689431bf88721122eb7c1
  Migrations: 0xcc3979c6af9f5003445f26e5c1dfdc140bba29c5
Saving successful migration to network...
  ... 0x2a3b60f8cf3571ef12bb81ea5c80d22b6e2febae8e38f2dd0c05e0f147137305
Saving artifacts...**

Now I  am trying to  intract with truffle i am getting the following error

ChainList.deployed().then(function(instance){app= instance });

Error: ChainList has not been deployed to detected network (network/artifact mismatch)
    at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/contract.js:454:1

I Think I followed all steps but i don't know what  went wrong please help me


texts:
can any Ethereum Dev answer if there's a ERC or even an EIP to define a way in which you can have a Smart Contract to be plug-and-play'd into another Smart Contract? I'm trying to come up with something, but don't want to reinvent the wheel here.

To be more clear, what I'm planning to do is to create a dynamic and mutable mapping of address(SC)/functions/parameters allowing any function of any SC to be called from the one who implements this standard, thus, plug and play.


texts:
I'm writing a smart contract to distribute the created tokens to multiple address. Looking around on the web I may found what I was looking for but I don't know how to insert the addresses in the field; I tried in different ways but none worked.
This is the function to distribute token:

function distributeToken(address[] addresses, uint256 _value) onlyOwner {
     for (uint i = 0; i < addresses.length; i++) {
         balances[owner] -= _value;
         balances[addresses[i]] += _value;
         Transfer(owner, addresses[i], _value);
     }
}

and this is the function in the contract:

I tried to insert the addresses in these ways:

0x0000000000000000000000000000000000000001
0x0000000000000000000000000000000000000002 0x0000000000000000000000000000000000000003

['0x0000000000000000000000000000000000000001', '0x0000000000000000000000000000000000000002', '0x0000000000000000000000000000000000000003']

0x0000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000003

but no one worked.
How can I solve this? Thank you


texts: Calculating price: "Operator / not compatible"

texts:
function getLatestPrice() public view returns (int, uint8) {
    (
      uint80 roundID,
      int price,
      uint startedAt,
      uint timeStamp,
      uint80 answeredInRound
  ) = priceFeed.latestRoundData();

    uint8 decimals = priceFeed.decimals();
    return (price, decimals);
  }

  function priceInEth() external view returns (uint) {
      uint txtPriceUsd = 2;
      (int price, uint8 decimals) = getLatestPrice();

      // --------------------------- PROBLEM IS HERE ---------------------------
      return price / txtPriceUsd;
  }

I'm just learning Solidity math, so I'm trying to understand why this doesn't work.
What I'm trying to do:
I have an integer price (a USD value, I'd like to have it be a float — for simplicity I'm trying integers first). Then I fetch ETH latest price in USD, divide it to figure out the price in ETH.
But there is something going on that is preventing me from calculating it.
Can someone give me some pointers on why that is? And how I might go about fixing that? Thanks!
EDIT
Just realized I'd need to make some adjustments to return value of getLatestPrice() which is (price, decimals). And insert the decimal in the price to get a correct view of it's price (it's returned as integer).


texts: Can you recieve inaccurate data from chainlink?

texts: Can you receive inaccurate data from Chainlink blockchain oracles? What if the incentive to distort the data is more than the cost?


texts:
What i am attempting to do is elementary, adding a struct to a storage array.  But for some reason I am getting the following error

TypeError: Indexed expression has to be a type, mapping or array (is function (struct KYC.Fraud storage ref) returns (uint256))

contract KYC {
    struct Fraud {
         address bank;
         bytes32 accountNumber;
         bytes32 routingNumber;
         uint256 amount;
         uint256 timestamp;
    }

    Fraud[] frauds;

    function reportFraud (address bank, bytes32 accountNumber, bytes32 routingNumber, uint256 amount) external returns(uint256 fraudID) {
        Fraud memory fraud = Fraud(bank, accountNumber, routingNumber, amount, now);
        frauds.push[fraud];
        return frauds.length - 1;
    }


texts:
Do I have some questions:

Do I right understand that list contains all tokens of standard ERC-20? Or this list is not full?
Can the token be sent to Ethereum addresses (for example 0xd4dd25e3995cB76a0C82bD305fB10A1bC0870316) from Exchanges (for example Binance) via standard ERC-20?

Sorry, it may be a silly question. I am a newbie.


texts: Miners stop working in Azure consortium blockchain

texts:
I had setup Blockchain on Azure (BaaS) few months ago, Its working fine till few days before,

but now I am facing issue with my transaction, after debugging I found that my transactions are not getting any response from blockchain,

I checked admin portal where I found All the miners Have stopped working

I have also checked all the VM's are running

Any one knows How to troubleshoot this issue?


texts: Smart Contract security concerns. Is Lothereum fail proof?

texts:
Googling around I found this on gitter.

Is this drawing process uncrackable?
How can I consider it safe or not to use it?
How would you guys evaluate that?


texts: How do I activate HTTP JSON-RPC on a Geth node?

texts:
I want to use RPCs to access a Geth node.
Do I have to execute admin.StartRPC on the node in order to activate the RPC server?


texts: Compiling a contract via web3 creates a possibly random key


texts: Keccak hash of null values, result in different hashes for different types

texts:
I was testing the hash value of null values for different types and I'm curious how it generates different results for different types. Here are the results.

String = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
Address = 0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a
Bytes = 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563
Uint = 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563


texts: generate large amount of ethereum address with hardware wallet

texts: How to generate large amount of Ethereum address with hardware wallet. Currently Ledger Live only allow to generate one address at a time. If generating thousands of address will take many times to generate.


texts: Is there a use case of keeping 2 chains?

texts:
I know that Ethereum was forked 2 chains due to DAO hacking. so Ethereum Classic was borned at that time. 2 chains are distinguishable by different chain id.

I had a strange idea, a malicious miner can keep two chains(for example ETH, ETC). Think of this way, I have a two machine and one(A) is running on ETH network, another(B) is running on ETC. connection can be established between A and B if I want. A node can delivery the block to B node when it get a propagated block, also vice versa. the benefit which can be given by doing this is that I can mine two types(ETH,ETC) block to earn reward.

Do you think this is illegal?
Do you think this has practicality to earn reward by keeping two chains?

Sorry for my English.


texts: Why there are two full-R23 files (DAG files) in .ethash folder?

texts: I am using Ubuntu 14.04 and running go-ethereum in it. In the ~/.ethash/ folder, I see that there are two DAG files created when mining begins. The first one is created immediately after mining starts and the second one after some time.I am interested in knowing the reason for it.


texts: What happens when some files use the ABIEncoderV2 and some don't

texts:
The version 2 of the ABIEncoder used by solidity can be enabled with:

pragma experimental ABIEncoderV2;

What happens if I compile with truffe  a project that has some files with that pragma and some without it? Is the entire project using the new pragma or only the contracts declaring it?

What happens if I compile a solidity file without the experimental pragma, but that imports a file with the pragma?


texts: ERC20 Interfaces overwriting ERC721 functions - Possible to adhere to standard?

texts:
Is it possible to have a contract that both generates and manages its own NFT according to the ERC721 Standard, and is able to make calls to outside ERC20 contracts? My contract currently inherits the ERC20 interface or contract, so that it can calls an instance of ERC20

someCoin = ERCInterface(xxxxxx);
myCoin.transferFrom();

However, the approve() and transferFrom() functions have the exact same number and types of arguments in both standards so the ERC721 functions get overwritten. Does anyone know of a workaround? Alternatively, can someone provide an example of how a direct contract call can be written? Thanks


texts: How to access Objects from different Contracts

texts:
Goal: I want to create a solidity programm that includes 3+ contracts. This means I have one contract (lets call it master for now) which aims at setting everything up. This means this contract has a function that ask for addresses of contracts that should interact with each other. The master stores this address information and can later pass it to other contracts. I will have 3+ other contracts that get this "contact information" from the Master contract and then those 3+ start interacting with each other(Changing other variables, calling functions of other contracts)

Example:
Contract has a Setup-Function that asks for addresses of contracts A and B. He stores those addresses and calls Function 1 of contract A. Now Function 1 of contract A does some stuff, then looks up the address of Contract B (this is where I struggle) and calls Function 2 which belongs to Contract B.

Question: Can somebody help me with this question and give me some example code? I already tried passing a struct with the addresses from the Master to A and B, tried to store them in a mapping and tried to make my Master contracts data accessible to A and B via inheritance.

If you have any trouble understanding this question feel free to ask ;)


texts: Contracts with many to many payouts -- is this unrealistic?

texts:
I'm thinking of writing a contract in which the payoff is proportionately split amongst N recipients. Is this intractable in ethereum since as the number of recipients grows, this would require N transactions instead of 1, and the gas price would be linear in N?

As a contrived example, let's say I have a virtual boxing match. There are two boxers, A and B, and you can choose to join the pool for each one as a backer with a certain amount of tokens. After the fight, currency is taken from all the supporters of the loser, and then distributed to all the supporters of the winner in proportion to their stakes.

If there were N participants in the loser pool, and M participants in the winner pool, then this would be (N+M) transactions beforehand, and then M transactions after the fight.


texts: Web3 - Cannot read property 'clearSubscriptions' of undefined

texts:
While creating a web3 instance, and attempting to call setProvider with a valid provider (Ganache), I get a TypeError.

TypeError: Cannot read property 'clearSubscriptions' of undefined

Steps to reproduce the error

const Web3 = require("web3");
const web3 = new Web3();
web3.setProvider(ganache.provider());    //The error occurs at this point

My Ganache is successfully running on localhost:12345 with 10 accounts, each having 100 eth.

My dependencies are

"dependencies": {
    "async":             "^2.6.2",
    "bignumber":         "^1.1.0",
    "bignumber.js":      "^2.4.0",
    "command-line-args": "^2.1.6",
    "ethereumjs-abi":    "^0.6.7",
    "fs":                "0.0.2",
    "ganache-cli":       "^6.4.3",
    "js-sha256":         "^0.3.2",
    "request":           "^2.88.0",
    "solc":              "^0.5.4",
    "web3":              "^1.0.0-beta.55"
  }

Am I missing something?


texts:
If possible, I would like to use parity with my private ethereum network.

This answer (https://ethereum.stackexchange.com/a/9148/4575) provides us a solution that geth will run on the background and parity will pull information from geth.

[Q] Is it possible to run only parity (geth won't run on the background) that is connect to the private etheum network and do mining, deploy contract, send transactions etc.?

If yes is there any well explained tutorial related to adding private network peers to Parity and make Parity to connect into the private network's chain instead of the public ethereum's chain.

Is this link might help me?https://github.com/ethcore/parity/wiki/Configuring-Parity. If yes which parameters should I focus on to change?
Also how could I add admin.addPeer("enode://<id>@<ip>:<port>?discport=0"); and provide the --networkid to Parity to allow it to connect into the private network like we could do in geth?

Example by using geth as follows I can connect into my private network:

id="<enodeId>";
datapath="/MyEthereumEbloc"
geth --networkid 23422 --datadir="$datapath" --rpccorsdomain '*' --rpc --rpcaddr "localhost" --rpccorsdomain="*" --rpcport="8545"--bootnodes enode://$id@<ip>:<port>

Please note that I was not able to find any tutorial related make parity connect into private ethereum network, which might be very helpful.

Thank you for your valuable time and help.


texts: Is it possible to inspect EVM memory or stack?

texts:
I'm curious if anyone operating a node can inspect the EVM memory or stack as contract code is being executed.

For example, a gambling app contract code "draws" a random card by querying a randomness source for a number in range [1, 52]. It stores the raw value of the card in a variable, does stuff with it, then throws it away. Could anyone be watching the EVM memory or stack and read the raw value stored in the variable while the contract code executes?


texts: Every Solidity code is necessarily called Smart Contract?

texts:
Is it correct to say that even a Solidity code that doesn't contain any financial transactions to exchange digital assets or tokens and it only stores some information on the blockchain is a Smart Contract?

Regarding to this fact that the term of "Contract" usually refers to a mutual convention between two or more parties to determine the missions of every party. And if this contract is financial, usually an asset is exchanged between parties.

Am I wrong?


texts: web3.eth.sign sometimes gives V parameter of 54 or 55, ecrecover then fails. What's going on?

texts:
I've been using ecrecover and web3.eth.sign to authorize transactions, but when I run web3.eth.sign a second time on my server, the V part of the signature is wrong(or, at least, ecrecover thinks it's wrong). I read that it should be 27 or 28, but sign() is giving me 54 and 55. However, if I changes these to 27 and 28, respectively, ecrecover works again. What's going on????

exports.sign = async(signer, nonce, amount, forUser) => {
  // pack data into the message
  let ret = [];
  let data = (nonce * 2 ** 32) + amount;
  let hexData = web3.utils.toHex(data).slice(2);
  for(let i = hexData.length; i < 16; i++) {
    hexData = "0" + hexData
  }
  let message = "0x1337beef" + forUser.slice(2) + hexData;
  // sign the message
  let sig = (await web3.eth.sign(message, signer)).slice(2);
  let r = "0x" + sig.slice(0, 64);
  let s = "0x" + sig.slice(64, 128);
  let v = web3.utils.toDecimal('0x' + sig.slice(128, 130)) + 27;
  // THESE NEXT TWO LINES MAKE THINGS WORK BUT THEY
  // ARE STINKY AND I MUST KNOW WHY THEY ARE NEEDED!!
  if(v == 54) { v = 27;}
  if(v == 55) { v = 28;}
  ret.push(message);
  ret.push(v);
  ret.push(r);
  ret.push(s);
  return ret;
}

Thanks in advance!!


texts: How to watch contracts on Mist without ABI?

texts:
I've been trying to watch the Ethereum Alarm Clock contract on the main net (@ 0x6c8f2a135f6ed072de4503bd7c4999a1a17f824b) via Mist. This is the first time I've used Mist to watch contracts and I don't know how to get the JSON description, for example where it says:

  In order to watch and interact with a contract already deployed on the
  blockchain you need to know its address and description of its
  interface in JSON format.

When I enter the contract address of the Ethereum Alarm Clock I get the following error:

I went to Browser Solidity and there didn't seem any way of getting the JSON description. I also checked out EtherChain and could only get the EVM code which is useless. What do I need to do here?


texts: Connecting block chain front end with smart contracts

texts:
https://ethereum.stackexchange.com/posts/3097/edit#=

after this link how to call functions.
suppose my contract name is bank and i have deposit fucntion in it. when i am using bank.deposit(1000) it is showing error that bank is undefined.
how to solve it?


texts:
I have a contract that creates other contracts.  It then pushes these contracts in an array, address[] public newContracts.   The only problem is I'm having trouble calling them from python.

factory.json is my abi and the address and web3 seem to connect fine, just can't call the variables correctly.

Thanks for any help

from web3 import Web3
import json
from web3.providers.rpc import HTTPProvider
contractAddress = '0x3c7bec02bd4fa73dce24413d2a13c02e1a91e858'
web3 = Web3(HTTPProvider('https://ropsten.infura.io'))
with open('factory.json', 'r') as abi_definition:
    abi = json.load(abi_definition)
print (web3.eth.blockNumber)

fContract = web3.eth.contract(abi,contractAddress)
print ('Creator',fContract.call().creator)
print ('Contracts',fContract.call().newContracts)
print ('OracleName',fContract.call().oracleName)


texts: How can I replace a pending transaction with web3 v1?

texts: I want my dApp to automatically rebroadcast a transaction if after 50 blocks it is still unmined. How can I do this in javascript with web3 1, having all infos about the pending one? (txHash, ecc)


texts: I am unable to send coins from my Metamask wallet (details below). Thx in advance

texts: I am not able to send any coins from my Metamask wallet. After hitting Send, the next screen shows two rectangles - each associated with the accounts to be used (the ‘from’ account, and the ‘to’ account). After entering an amount of whatever currency, I am no longer prompted to do anything, effectively disabling my ability to send / spend.


texts: Why are some transactions lost during mining?

texts: I open mine in my own private chain, and I submit the transaction at the same time. Some of the transactions do not trade hashing, and then the fair is lost. Why?


texts: Read private data of smart contracts from Blockchain

texts:
Is there any way to read smart contracts private or internal data from Blockchain?
The smart contract data is on Blockchain so probably the data can be read from servers. Is data encrypted on Blockchain?

I want to store sensitive data in my smart contract but I just want to know is this normal or I should store contract sensitive data on some other trusted sources?

Thanks


texts: How to implement a payment on a web page using MyEtherWallet?

texts:
I have seen a few solutions regarding implementing a payment (like donating) on a web page using MetaMask.

But I really want to know if we can do that same payment on a web page with MyEtherWallet too. I have been trying to find solution to do with the MyEtherWallet, and I have not found one yet.

Any solutions or ideas, I highly appreciate. Thank you.


texts: Should I consider building a mining rig with PoS being so close?

texts:
I am just curious if in your opinion it is worth building a small rig.

Probably looking at 2 or 3 Radeon 7950s or R7 370's and going from there, I am  a little worried about the proof of stake changeover. It might be my understanding of the concept but am I right in thinking my rig will be obsolete (for mining ethereum) when this change happens?

Cheers.


texts:
I mentioned last time that I was working on a big integer library.

After some work, I have managed get 512-bit arithmetic kinda working!!!!

Credits to /u/benjaminion for the modSmall function.

Here are the 16-bit and 512-bit versions. I develop in uint8 then port it to uint256 by replacing all the uint8.

Some issues I am currently facing and would like some help for:

The modulo function is really slow for small modulus & large dividend
The modular multiplication function is slow
No division yet, should follow closely to modulo
Gas costs are really high!

I am looking into other algorithms for modulo and modular arithmetic.
I am not too knowledgeable in this area so help would be much appreciated!

Also, I was wondering how to get gas costs from Testrpc. The emulated VM in Remix(online compiler) tells me the gas costs, but it's too slow.

I may also have also messed up something when I was prettying up the code for Reddit or missed a few edge cases.
Any feedback is welcome!

P.S. I posted this in Reddit too


texts: How is it possible in an ethereum contract to sort the public adresses of senders of eth in the contract in the alphanumeric order ?


texts: How to update a deployed smart contract?

texts:
I've started developing smart contracts with Truffle and when I edit a contract I always redeploy it by adding another migration script. There are two things that I wonder about:

Is this the way it should be done, or is there a better way?
When I redeploy a contract with a new migration script, the deployed contract also gets a new address. Is it also possible to migrate a smart contract and let it keep the existing address?

All tips are welcome!


texts: Solidity: adress.transfer(this.balance) not working

texts:
In my contract I have a function that's supposed to move the balance of the contract to its owner.
The function is:
function moveFunds(){
owner.transfer(this.balance);
}

owner is set to be: address owner = msg.sender; in the constructor of the contract.

but it doesn't work. The transaction is completed, but the balance doesn't change in the contract or in the owners wallet.
Does anyone have any idea how to solve this? Is there another way to do this?
I've tried both in private network and in Rinkeby multiple times.
There's also a donate function in the contract that works well, the value input is added to the contracts balance and the same value is subtracted from the sender. (I do this before I try to transfer anything to owner)

Thanks in advance.

Edit: Whole contract below: (formatting in here didn't work out..)

   pragma solidity ^0.4.2;

contract donation {
    address owner;
    modifier onlyowner {
        if (msg.sender == owner) _;
        }
    address[] _giver;

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

function donate() public payable {
        if (msg.value == 0) {
        revert();
        }
      addGiver(msg.sender);
    }

   /*
   * TODO:
   */
function moveFund() public onlyowner{
      owner.transfer(this.balance);
    }

function addGiver(address _a) internal {
        _giver.push(_a);
    }
}


texts:
This question is similar to How to withdraw Ether from a contract? but different.

I am writing a smart contract for a token.

How can I transfer the tokens from the contract to my personal purse (non programmatically using such a program as Ethereum Wallet)?

Can I send the tokens from the contract like as I can do with regular wallet?


texts: How to know in advance the gas used by a transaction?

texts:
I want to send an ERC20 token (Ropsten network). So I execute a function 'transfer' on a contract. When The transaction is sent, I can get the gas used in the receipt. Few months ago this amount was 36879 (0xff82bbc36b89e9ba428863c639ceebd87115c1012cdbf94b881641579aba07fe), now it is 51879 (0xe0bc6f9faad1135f3dad652603864792b7b1f16d7148c550fe580772952c3130) and I got a 'out of gas' error message.

Questions:

1) the transaction fees are (gasPrice * gas), right ? If I set gasPrice and gas, why, gas used (36879) is not enough anymore ?

2) If I set the value of gas, why must I need to provide gasLimit also ?

3) How can I know the exact transaction fees (gas used) before sending it ?


texts: Decentralized dapp music player using smart contracts on ethereum?

texts: Has anyone made a decentralized music player on ethereum using smart contracts? Say if I wanted to upload a mp3 file to IFPS and everytime someone plays the midi file the smart contract will deduct .0001 eth from the account. Has anyone done something like this?


texts:
3 hours ago, somebody stole most of my coins out of Metamask. For 2000 dollars!!
For the second time! In August for the first time. But then I left my Metamask unlocked so I thought this was the reason.
Now again, while I always unlock, they stole it again.
And you can see perfectly on Etherscan to which address.
In my Metamask it's even my 'preferred address". How is this possible?


texts: Passing constructor arguments in the NewContractCreation in go-ethereum

texts:
I am trying to create a transaction to deploy a contract using the types.NewContractCreation() method in the core folder of go-ethereum. However I don’t understand how to pass the parameters of the constructor in the data field. Should I just join the byte code and the parameters in byte format? Or is there a preferred way to do it?

Any help appreciated


texts: Contract address.transfer method gas cost

texts:
Who will pay the gas in the following scenario?

Lets say we have the following simple function. That sends an amount from the contract back to the sender.. just an example.

    function withdraw() public payable
    {
       address member = msg.sender;
       member.transfer(msg.value);
    }

The sender to the method will obviously pay the fee to send the transaction to the method and execute the statements. However, who will pay the gas for the resultant transaction that will get created from that code?

Secondly, in general about the transfer() method, what are the default parameters. I know it uses a gas limit of 2100, but what about gas price? Also, does this gas come from the value passed in or from the contracts balance and the whole value will be transferred.

Don't down-vote the question for 'lack of research' I am aware of the usual conditions of gas coming from the balance, in distinction of the transactions value. Just curious about the transfer() method in particular. As there is not a ton of documentation about its implementation as it differs from send(), that i could find.


texts: Web3.js is taking lot of time to return a promise

texts:
Web3 is taking time near about 5 minutes even after the transaction got 3 confirmations to return a promise from a smart contract which is deployed on kovan testnet. Please give some suggestion how to overcome this problem.

async uploadData() {
      const account = await web3.eth.getAccounts();
      const exists = await this.isRecorded(this.hash);

      if (exists) {
        alert("Document Already Signed");
      } else {
        await instance.methods
          .signDoc(
            this.hash,
            this.notaryForm.email,
            this.notaryForm.partyA,
            this.notaryForm.partyB
          )
          .send({ from: account[0] });
        alert("Successfully Signed the Document");
      }
    },


texts: Is running an app on Ethereum Classic cheaper than on Ethereum?

texts:
ETC price is 1/10 that of ETH, so theoretically it could be cheaper to run an app on ETC instead of ETH. However, I don't see users switching to ETC in droves, which suggests that it might not be.

Can anyone explain to me if it is cheaper to run an app on ETC, and if it's not, explain why.


texts: How do I edit this contract to remove the fee payment and mint a new token?

texts:
So I have a contract, What I wanna do?

Remove the payment fee;

Replace variables to deploy my own token;

Here is the original contract
https://ropsten.etherscan.io/address/0x794e3d275ded78da483367359806cf394ffa46ed#contracts

(Remove fee) Im beginner in solidity, but I guess I should remove the 469 line which is:
 feeReceiver.transfer(msg.value);

(Replace and mint a new token) I don't know what to do, I guess I need just change variables in constructor (Lines 451-456)?

constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
      _name = name;
      _symbol = symbol;
      _decimals = decimals;

      // set tokenOwnerAddress as owner of all tokens
      _mint(tokenOwnerAddress, totalSupply);

      // pay the service fee for contract deployment
      feeReceiver.transfer(msg.value);
    }

to:
constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address payable feeReceiver, address tokenOwnerAddress) public payable {
      _name = "Token Example";
      _symbol = "TE";
      _decimals = 18;

      // set tokenOwnerAddress as owner of all tokens
      _mint(0x000000000000000, 300000000000000);

      // pay the service fee for contract deployment
      feeReceiver.transfer(msg.value); (and delete this to stop fee payment)
    }

But gives Unused function parameter remove or comment the variable, I can't figure out whats a happening


texts: I found a useful Ethereum script. How do I run it ELI5?

texts:
What's the least painful option to use the Stackexchange Bounty script described here?

I'm dreaming of a chrome extension :)


texts:
How does one sell their goods and services for ETH?

Craigslist allows users to enable a 'cryptocurrency okay' notice, but are there any other means to sell your goods (like eBay or Amazon third-party sellers) and services?

Should merchants make their own websites? Where is a registry for them?


texts: How to unit test contract private and internal functions?

texts:
How can we unit test contract private functions using the Truffle framework?

Since Solidity doesn't have package access or reflection language features, standard private testing approaches don't work.

Creating a test contract which inherits from the contract we're testing seems to be the only approach that works. However these tests would run on the blockchain.

Is there a way to unit test private functions from Javascript?


texts: Is it possible to interact with a deployed contract (not mine) with Remix Solidity IDE?

texts:
I know that I can call methods or send transactions with web3.js.
But, is it possible to interact with a deployed contract (not mine), like golem, status, etc.. with Remix Solidity IDE?


texts: Is there an Ethereum wallet compatible with Mac OS X 10.7.5 or earlier?

texts:
I'm a non-techy newbie. I have a .json file relating to my presale Ether purchase which I am unable to access.

I downloaded the Ethereum wallet 0-7-6 for Mac, but unfortunately I only have Mac OS X 10.7.5 and I received a message saying the application needs Mac OS X 10.9 or later.

Is there any alternative wallet that I can use to access my presale Ether that would be compatible with Mac OS X 10.7.5?

Thanks


texts: can i access latest blocks data with geth --fast --rpc?

texts: Geth full node is consuming too much of hard disk space. If i don't use full node and use geth --fast then will I able to get latest blocks data ?


texts: why is there no software downloadable wallet for ETH?

texts:
There is bitcoin core wallet..which you download on your computer and you have 100% full ownership of your bitcoin BUT etheruem NEVER has anything like this..most of the wallets are either on a website or some company or some service

What happens if these websites, companies and services go burst(i mean history shows this, dont be in denial please)

Please answer below
Thanks

source: https://ethereum.org/wallets/

  What is an Ethereum wallet, and which one should I use?

  Wallets are applications that make it easy to hold and send ETH, as well as
  interact with applications built on Ethereum.

  Want to install a wallet? Here are a few options:

  MetaMask: browser extension and mobile wallet for iOS and Android

  MyCrypto: web-based wallet

  TrustWallet: mobile wallet for iOS and Android

  MyEtherWallet: client-side wallet

  Argent: mobile wallet for iOS and Android, optimized for DeFi

  Coinbase Wallet: mobile wallet for iOS and Android

  Gnosis Safe: security oriented multi-signature wallet


texts:
I have Very Interesting cases about Libraries.
CASE 1:
I read the following in the official solidity docs:

Library functions can only be called directly (i.e. without the use of
DELEGATECALL) if they do not modify the state (i.e. if they are view
or pure functions), because libraries are assumed to be stateless

I am sure they mean to call libraries with the use of .call on the address and they say this would only be possible if the function of the libraries would be pure/view.  Let me reprase in the a), b), c) what I don't understand.
a) In the copied sentence, It says: if they do not modify the state. I am not sure how the library changes state at all. it doesn't have its own and all it can do is change the passed variable's value.
b) I tried using it with addr.call, but I didn't specify functions as pure/view and it still let me do this. It's interesting why it let me since in the docs, it says it should revert.
c) Why would I ever want to call libraries with the .call ? This just defeats the whole purpose of libraries.
**D) ** It seems like if I use internal functions on libraries, the library code ends up in the compiled version of the contract. Any reason why this is good ? if that's so, I'd have used another contract instead of library.
Case 2:
In the docs, It's really a bad example how it passes the reference type. Let's say I have a library:
// Let's say this was written by third-party and it's put on github.

library libraryContract {

   function libraryTest(){

   }

}

// I can import the above here.

// import "libraryContract.sol";

contract myContract {

   function contractTest(){
      // I call it. This will work. Now, let's say in this contract, I
      // have a variable called `uint x = 0;`. and what libraryContract
      // should be doing is change the value of the passed argument.
      // If I pass `x` here directly, and change the argument in
      //`libraryTest`, It still doesn't work since it's not passed by
      //reference or something. Another case is What If I want my library
      //to be changing the struct's properties, but library doesn't see
      //the definiton of struct.
      libraryContract.test();
   }

}


texts:
Why are interfaces restricted to enums, events, structs and functions?
Why are they restricted from containing state variable declarations if they can contain structs?


texts: To pay for the gas for ERC20 token holders' transactions

texts:
I would like to make a ERC20 contract in which the contract owner will pay the gas for clients transactions (for example, to allow to transfer tokens between clients for free).

There is an excellent post about how to make a contract when a receiver of ethers pays for the gas: https://programtheblockchain.com/posts/2018/02/17/signing-and-verifying-messages-in-ethereum/
The idea in it is that the contract owner sends a signed transaction off-chain to receiver of ethers, and receiver calls some contract function passing the signature there and paying for gas actually. This function checks the transaction signature with ecrecover function, the owner address and transfers the appointed amount of ethers to receiver.

What if to add a similar new function to a ERC20 contract, which will accept both tokens sender's and receiver's address, the amount of tokens and sender's signature. This function will be called by the contract owner (who pays blockchain fee). The function will recreate the transaction, check sender's signature and address and transfer tokens from the sender to receiver (if verification is OK). Senders can send signed transactions to the contract owner off-chain.
I think it will work, but what about ERC20 compatibility?
Will it violate ERC20 standard rules or have any other security issues?


texts:
all.

I'm facing an issue with steadily decreasing average Hashrate on my rig.

I was using Genoil for a couple of days and my average, from Ethermine page, was hanging around 18MH/s. I'm doing some small OC, nothing fancy. I decided then to move to Claymore, because I was reading that I could get more than 18MH/s with my setup.

I started to play with my OC first on Genoil and couldn't notice any difference. Then I've moved to Claymore, ETH only mode. After that I notice a steady decline in the Hashrate average. I've tried to move back to Genoil, use the Cuda mining from Genoil, update Ethminer to 0.11, go back to Claymore, go back to my previous OC settings, but the trend continues. I was averaging 15.5MH/s at a point today.

Is there anything I'm missing?

My setup:
MSI GTX 1060 3GB ITX
Windows 10 Pro N

I will post later the rest of the details, since I don't remember by heart.


texts: Infura websocket API timing out on connect

texts: Has anyone ever had issues with the Infura Websocket API suddenly ceasing to respond.  I have been using it to subscribe to event logs, but now the connection to the API is timing out.


texts: In Solidity, Is it possible to pass a struct as a parameter between contracts?

texts:
I have a struct in contract A, and want to pass it to contract C via contract B.

Is it possible?


texts: geth --testnet error:"could not open database"

texts:
I am new to Ethereum. I cannot seem to use the geth cli on the testnet.

geth and the GUI (synchronized with the testnet) work, but when I try to to get --testnet, I get:

dyn1237-76:eth1 sam$ geth --testnet
I1007 19:26:19.868747 ethdb/database.go:83] Alloted 128MB cache and 1024 file handles to /Users/sam/Library/Ethereum/testnet/chaindata
Fatal: Could not open database: resource temporarily unavailable

(I m on a OSX El capitan).
Can anyone help please?


texts: How to connect geth client ( runing Ropsten testnet) with Mist on top of that without it's own geth node?

texts:
Running Ubuntu as OS via Virtual Box and have finished my dapp with truffle.Now instead of using testrpc, I want to test the dapp in the live testnet.The actual one is Ropsten as I have found out.

So I installed the geth client and downloaded the Ropsten testnet blockchain.
Then I also installed Mist wallet 0.8.7 latest version. However when I run the geth client first, connectetd to Ropsten testnet, I can not launch Mist wallet.Connecting to node geth, testnet, is failing is the message I' getting!

Any possibilities to make this work? Haven't found something really helpful so far.

And how long does it take to mine some ether on the new testnet? geth --testnet --mine seems to be the right command I suppose.

Some help is much appreciated.
Thanks.


texts: Sending ether between contracts that does not know each other

texts:
I want to create a call from a smart contract A to a smart contract B.

Premisses:
I have enough ether balance in A
I do not know what is the name of B's function to be called
B's function is payable and do not accept any arguments
hexData is the SHA3 of the name of the B's function
I do not want to delegate A's storage
I want to fail if B's function caused an EVM exception

Two questions:

a) Is it the best way to codify this need?

function newTransferToB(address B, uint256 valueInWei, bytes4 hexData) onlyOwner {

    if(!B.call.value(valueInWei)(hexData)) revert();

}

b) What if I do not know the number of arguments of B's function?


texts: Swarm node crashes when uploading big files

texts:
I noticed that when I try to upload files which size are around 100KB or higher to swarm, my node crashes with the following message:

panic: runtime error: slice bounds out of range

goroutine 27181 [running]:
github.com/ethereum/go-ethereum/swarm/storage.(*LazyChunkReader).join.func1(0xc424b125b0, 0xc422322410, 0xc421ccd920, 0xc421ccdbc0, 0x0, 0xc42102afb8, 0xc42102afe0, 0xc420257000, 0x3000, 0x3000, ...)
    /build/ethereum-ZSPmrv/ethereum-1.7.3+build11486+xenial/build/_workspace/src/github.com/ethereum/go-ethereum/swarm/storage/chunker.go:438 +0x3d9
created by github.com/ethereum/go-ethereum/swarm/storage.(*LazyChunkReader).join
    /build/ethereum-ZSPmrv/ethereum-1.7.3+build11486+xenial/build/_workspace/src/github.com/ethereum/go-ethereum/swarm/storage/chunker.go:437 +0x2bf

Has anyone experienced that too? Is there a way to patch this?

Edit: the directory where I'm trying to copy the file into, was mounted through swarmfs.


texts: web3: call function in contract that creates another contract and returns address

texts:
from what I (quickly) looked up, payable functions do not return values to the web3 API.

In my particular use case, I have a 'Master' contract that serves as a factory for other contracts, and stores all contracts created in such way in an array.

How can I call something like master.createAnotherContract() and know the address of the newly created contract?

I think a function that gets the last contract in the array can deliver messed up results; creating the contract using the factory and reading the last contract would not be atomic...


texts: Quorum 7nodes example unable to attach to geth node 1,2,4,5,6,7 but node 3 is working

texts:
Quorum 7nodes example all of sudden gave fatal error unable to attach to remote geth.
Problem: can't attach to geth node
Every time I import metamask account to geth node (using personal.importRawKey("private key", "password")) to use that account to interact with Dapp using metamask. when i restart the machine and try to open geth node I am unable to access that particular geth node(let say node 1) but all other nodes work fine.

PFA screenshot