forked from PegaSysEng/pantheon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PRIV] Complete Private Transaction Processor (PegaSysEng#938)
* Remove entries() in KeyValueStorage * Implement Private Transaction Processor * Implement PrivateTransactionReceipt * Refactor privacy parameter injection * Disable ether for private transaction * Implement AcceptanceTest * Fix PrivateWorldState injection * Add unimplemented private transaction type - https://entethalliance.github.io/client-spec/spec.html#sec-extensions-json-rpc * Change Private Transaction RLP * Change Private Transaction RLP for acceptanceTest * Fix copyright year * Fix build
- Loading branch information
1 parent
81fe994
commit 2358250
Showing
53 changed files
with
997 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/EeaJsonRpcRequestFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package tech.pegasys.pantheon.tests.acceptance.dsl.transaction; | ||
|
||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ResponseTypes.PrivateTransactionReceiptResponse; | ||
|
||
import java.util.Collections; | ||
|
||
import org.assertj.core.util.Lists; | ||
import org.web3j.protocol.Web3jService; | ||
import org.web3j.protocol.core.Request; | ||
|
||
public class EeaJsonRpcRequestFactory { | ||
|
||
private final Web3jService web3jService; | ||
|
||
public EeaJsonRpcRequestFactory(final Web3jService web3jService) { | ||
this.web3jService = web3jService; | ||
} | ||
|
||
public Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction> | ||
eeaSendRawTransaction(final String signedTransactionData) { | ||
return new Request<>( | ||
"eea_sendRawTransaction", | ||
Collections.singletonList(signedTransactionData), | ||
web3jService, | ||
org.web3j.protocol.core.methods.response.EthSendTransaction.class); | ||
} | ||
|
||
public Request<?, PrivateTransactionReceiptResponse> eeaGetTransactionReceipt( | ||
final String txHash, final String publicKey) { | ||
return new Request<>( | ||
"eea_getTransactionReceipt", | ||
Lists.newArrayList(txHash, publicKey), | ||
web3jService, | ||
PrivateTransactionReceiptResponse.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.