// Path: src/main/java/org/adridadou/ethereum/converters/future/CompletableFutureConverter.java
// public class CompletableFutureConverter implements FutureConverter {
//     @Override
//     public CompletableFuture convert(CompletableFuture future) {
//         return future;
//     }
// 
//     @Override
//     public boolean isFutureType(Class cls) {
//         return CompletableFuture.class.equals(cls);
//     }
// 
//     @Override
//     public boolean isPayableType(Class cls) {
//         return Payable.class.equals(cls);
//     }
// 
//     @Override
//     public Payable getPayable(SmartContract smartContract, String methodName, Object[] arguments, Method method, EthereumContractInvocationHandler ethereumContractInvocationHandler) {
//         return new Payable(smartContract,methodName,arguments, method, ethereumContractInvocationHandler);
//     }
// }
// 
// Path: src/main/java/org/adridadou/ethereum/values/EthValue.java
// public static EthValue wei(final int value) {
//     return wei(BigInteger.valueOf(value));
// }


import com.google.common.collect.Sets;
import org.adridadou.ethereum.converters.future.*;
import org.adridadou.ethereum.converters.future.CompletableFutureConverter;
import org.adridadou.ethereum.converters.input.*;
import org.adridadou.ethereum.converters.output.*;
import org.adridadou.ethereum.values.*;
import org.adridadou.exception.EthereumApiException;
import org.ethereum.core.CallTransaction;
import java.lang.reflect.*;
import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import static org.adridadou.ethereum.values.EthValue.wei;
package org.adridadou.ethereum;





/**
 * Created by davidroon on 31.03.16.
 * This code is released under Apache 2 license
 */
public class EthereumContractInvocationHandler implements InvocationHandler {

    private final Map<EthAddress, Map<EthAccount, SmartContract>> contracts = new HashMap<>();
    private final EthereumProxy ethereumProxy;
    private final InputTypeHandler inputTypeHandler;
    private final OutputTypeHandler outputTypeHandler;
    private final Map<ProxyWrapper, SmartContractInfo> info = new HashMap<>();
    private final List<FutureConverter> futureConverters = new ArrayList<>();


    EthereumContractInvocationHandler(EthereumProxy ethereumProxy, InputTypeHandler inputTypeHandler, OutputTypeHandler outputTypeHandler) {
        this.ethereumProxy = ethereumProxy;
        this.inputTypeHandler = inputTypeHandler;
        this.outputTypeHandler = outputTypeHandler;
// Path: src/main/java/org/adridadou/ethereum/converters/future/CompletableFutureConverter.java
// public class CompletableFutureConverter implements FutureConverter {
//     @Override
//     public CompletableFuture convert(CompletableFuture future) {
//         return future;
//     }
// 
//     @Override
//     public boolean isFutureType(Class cls) {
//         return CompletableFuture.class.equals(cls);
//     }
// 
//     @Override
//     public boolean isPayableType(Class cls) {
//         return Payable.class.equals(cls);
//     }
// 
//     @Override
//     public Payable getPayable(SmartContract smartContract, String methodName, Object[] arguments, Method method, EthereumContractInvocationHandler ethereumContractInvocationHandler) {
//         return new Payable(smartContract,methodName,arguments, method, ethereumContractInvocationHandler);
//     }
// }
// 
// 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/EthereumContractInvocationHandler.java
import com.google.common.collect.Sets;
import org.adridadou.ethereum.converters.future.*;
import org.adridadou.ethereum.converters.future.CompletableFutureConverter;
import org.adridadou.ethereum.converters.input.*;
import org.adridadou.ethereum.converters.output.*;
import org.adridadou.ethereum.values.*;
import org.adridadou.exception.EthereumApiException;
import org.ethereum.core.CallTransaction;
import java.lang.reflect.*;
import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import static org.adridadou.ethereum.values.EthValue.wei;

package org.adridadou.ethereum;





/**
 * Created by davidroon on 31.03.16.
 * This code is released under Apache 2 license
 */
public class EthereumContractInvocationHandler implements InvocationHandler {

    private final Map<EthAddress, Map<EthAccount, SmartContract>> contracts = new HashMap<>();
    private final EthereumProxy ethereumProxy;
    private final InputTypeHandler inputTypeHandler;
    private final OutputTypeHandler outputTypeHandler;
    private final Map<ProxyWrapper, SmartContractInfo> info = new HashMap<>();
    private final List<FutureConverter> futureConverters = new ArrayList<>();


    EthereumContractInvocationHandler(EthereumProxy ethereumProxy, InputTypeHandler inputTypeHandler, OutputTypeHandler outputTypeHandler) {
        this.ethereumProxy = ethereumProxy;
        this.inputTypeHandler = inputTypeHandler;
        this.outputTypeHandler = outputTypeHandler;
        this.futureConverters.add(new CompletableFutureConverter());