Skip to content

Commit

Permalink
Merge pull request #53 from apratt3377/updateToCurrentWeb3j
Browse files Browse the repository at this point in the history
Update to current web3j
  • Loading branch information
conor10 committed Sep 29, 2020
2 parents 17ca36c + be2e29e commit d3a1615
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
@@ -1,2 +1,2 @@
group=org.web3j
version=4.6.0-SNAPSHOT
version=4.7.0-SNAPSHOT
2 changes: 1 addition & 1 deletion src/main/java/org/web3j/quorum/UnixSocketClient.java
Expand Up @@ -40,7 +40,7 @@ public static void main(String[] args) {
.build();

RequestBody requestBody =
RequestBody.create(okhttp3.MediaType.parse("application/json"), PAYLOAD);
RequestBody.create(PAYLOAD, okhttp3.MediaType.parse("application/json"));

// use a proper host name as a DNS lookup still occurs (localhost should suffice)
Request request =
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/org/web3j/quorum/tx/ClientTransactionManager.java
Expand Up @@ -111,6 +111,19 @@ public EthSendTransaction sendTransaction(
return sendTransaction(gasPrice, gasLimit, to, data, value);
}

@Override
public EthSendTransaction sendTransactionEIP1559(
BigInteger gasPrice,
BigInteger feeCap,
BigInteger gasLimit,
String to,
String data,
BigInteger value,
boolean constructor)
throws IOException {
throw new UnsupportedOperationException("sendTransactionEIP1559 is not available");
}

@Override
public String sendCall(String to, String data, DefaultBlockParameter defaultBlockParameter)
throws IOException {
Expand Down
Expand Up @@ -15,9 +15,9 @@ package org.web3j.quorum.enclave.protocol
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody
import org.web3j.quorum.enclave.EnclaveClientConnectionException

/**
Expand All @@ -36,7 +36,7 @@ class EnclaveService(private val url: String, private val port: Int, private val
fun <S, T> send(request: S, path: String, responseType: Class<T>): T {
val payload = objectMapper.writeValueAsString(request)
val uri = "$url:$port/$path"
val body = RequestBody.create(JSON_MEDIA_TYPE, payload)
val body = payload.toRequestBody(JSON_MEDIA_TYPE)
val buildRequest = Request.Builder()
.url(uri)
.post(body)
Expand Down

0 comments on commit d3a1615

Please sign in to comment.