// Path: src/main/java/org/adridadou/ethereum/values/EthValue.java
// public static EthValue wei(final int value) {
//     return wei(BigInteger.valueOf(value));
// }


import org.adridadou.ethereum.EthereumBackend;
import org.adridadou.ethereum.event.EthereumEventHandler;
import org.adridadou.ethereum.values.*;
import org.ethereum.core.*;
import org.ethereum.crypto.ECKey;
import org.ethereum.facade.Ethereum;
import java.math.BigInteger;
import static org.adridadou.ethereum.values.EthValue.wei;
package org.adridadou.ethereum.ethj;




/**
 * Created by davidroon on 20.01.17.
 * This code is released under Apache 2 license
 */
public class EthereumReal implements EthereumBackend {
    private final Ethereum ethereum;
    private final LocalExecutionService localExecutionService;

    public EthereumReal(Ethereum ethereum) {
        this.ethereum = ethereum;
        this.localExecutionService = new LocalExecutionService((BlockchainImpl)ethereum.getBlockchain());
    }

    @Override
    public BigInteger getGasPrice() {
        return BigInteger.valueOf(ethereum.getGasPrice());
    }

    @Override
    public EthValue getBalance(EthAddress address) {
// Path: src/main/java/org/adridadou/ethereum/values/EthValue.java
// public static EthValue wei(final int value) {
//     return wei(BigInteger.valueOf(value));
// }


// Path: src/main/java/org/adridadou/ethereum/ethj/EthereumReal.java
import org.adridadou.ethereum.EthereumBackend;
import org.adridadou.ethereum.event.EthereumEventHandler;
import org.adridadou.ethereum.values.*;
import org.ethereum.core.*;
import org.ethereum.crypto.ECKey;
import org.ethereum.facade.Ethereum;
import java.math.BigInteger;
import static org.adridadou.ethereum.values.EthValue.wei;

package org.adridadou.ethereum.ethj;




/**
 * Created by davidroon on 20.01.17.
 * This code is released under Apache 2 license
 */
public class EthereumReal implements EthereumBackend {
    private final Ethereum ethereum;
    private final LocalExecutionService localExecutionService;

    public EthereumReal(Ethereum ethereum) {
        this.ethereum = ethereum;
        this.localExecutionService = new LocalExecutionService((BlockchainImpl)ethereum.getBlockchain());
    }

    @Override
    public BigInteger getGasPrice() {
        return BigInteger.valueOf(ethereum.getGasPrice());
    }

    @Override
    public EthValue getBalance(EthAddress address) {
        return wei(getRepository().getBalance(address.address));