Skip to content
Permalink
Browse files

Stubbed eea objects used for pantheon private transactions

  • Loading branch information...
iikirilov committed Apr 1, 2019
1 parent 775d8ff commit c7807142460c8de44516f52d4b4f6dfab0fd69ad
@@ -0,0 +1,7 @@

description 'Eea JSON-RPC API'

dependencies {
compile project(':core')
testCompile project(path: ':core', configuration: 'testArtifacts')
}
@@ -0,0 +1,20 @@
package org.web3j.protocol.eea;

import org.web3j.protocol.Web3j;
import org.web3j.protocol.Web3jService;
import org.web3j.protocol.core.Request;
import org.web3j.protocol.core.methods.response.EthSendTransaction;
import org.web3j.protocol.eea.response.EeaClientCapabilities;
import org.web3j.protocol.eea.response.EeaGetTransactionReceipt;

public interface Eea extends Web3j {
static Eea build(Web3jService web3jService) {
return new JsonRpc2_0Eea(web3jService);
}

Request<?, EthSendTransaction> eeaSendRawTransaction(String signedTransactionData);

Request<?, EeaGetTransactionReceipt> eeaGetTransactionReceipt(String transactionHash);

Request<?, EeaClientCapabilities> eeaClientCapabilities();
}
@@ -0,0 +1,44 @@
package org.web3j.protocol.eea;

import java.util.Arrays;
import java.util.Collections;

import org.web3j.protocol.Web3jService;
import org.web3j.protocol.core.JsonRpc2_0Web3j;
import org.web3j.protocol.core.Request;
import org.web3j.protocol.core.methods.response.EthSendTransaction;
import org.web3j.protocol.eea.response.EeaClientCapabilities;
import org.web3j.protocol.eea.response.EeaGetTransactionReceipt;

public class JsonRpc2_0Eea extends JsonRpc2_0Web3j implements Eea {
public JsonRpc2_0Eea(Web3jService web3jService) {
super(web3jService);
}

@Override
public Request<?, EthSendTransaction> eeaSendRawTransaction(String signedTransactionData) {
return new Request<>(
"eea_sendRawTransaction",
Collections.singletonList(signedTransactionData),
web3jService,
EthSendTransaction.class);
}

@Override
public Request<?, EeaGetTransactionReceipt> eeaGetTransactionReceipt(String transactionHash) {
return new Request<>(
"eea_getTransactionReceipt",
Collections.singletonList(transactionHash),
web3jService,
EeaGetTransactionReceipt.class);
}

@Override
public Request<?, EeaClientCapabilities> eeaClientCapabilities() {
return new Request<>(
"eea_clientCapabilities",
Collections.emptyList(),
web3jService,
EeaClientCapabilities.class);
}
}
@@ -0,0 +1,4 @@
package org.web3j.protocol.eea.request;

public class PrivateTransaction {
}
@@ -0,0 +1,7 @@
package org.web3j.protocol.eea.response;

import org.web3j.protocol.core.Response;
import org.web3j.protocol.eea.response.object.ClientCapabilities;

public class EeaClientCapabilities extends Response<ClientCapabilities> {
}
@@ -0,0 +1,7 @@
package org.web3j.protocol.eea.response;

import org.web3j.protocol.core.Response;
import org.web3j.protocol.eea.response.object.PrivateTransactionReceipt;

public class EeaGetTransactionReceipt extends Response<PrivateTransactionReceipt> {
}
@@ -0,0 +1,4 @@
package org.web3j.protocol.eea.response.object;

public class ClientCapabilities {
}
@@ -0,0 +1,4 @@
package org.web3j.protocol.eea.response.object;

public class PrivateTransactionReceipt {
}
@@ -3,14 +3,15 @@ rootProject.name = 'base'
include 'abi'
include 'codegen'
include 'console'
include 'contracts'
include 'core'
include 'crypto'
include 'eea'
include 'geth'
include 'hosted-providers'
include 'integration-tests'
include 'pantheon'
include 'parity'
include 'rlp'
include 'tuples'
include 'utils'
include 'contracts'
include 'pantheon'

0 comments on commit c780714

Please sign in to comment.
You can’t perform that action at this time.