Skip to content

Commit

Permalink
feat(quorum): private transaction support
Browse files Browse the repository at this point in the history
-----------------------------------------
	- Added v2.3.0-deploy-contract-from-json-private.test.ts that would support private
	transaction test for Quorum.
	- Added a QuorumPrivateTransactionConfig on openapi.json
	- Added Web3JsQuorum on plugin-ledger-connector-quorum and added a transact private
	method to be able to proceed with the private transaction.
	- Currently the privateUrl in the test is being truely optional
	and we need to address this in the future.
	- We are just passing privateUrl in all the instances even though
	we don't need to do private transactions everywhere.

Fixes hyperledger-cacti#951

Co-authored-by: Travis Payne <[email protected]>
Co-authored-by: johnhomantaring <[email protected]>
Co-authored-by: jagpreetsinghsasan <[email protected]>
Co-authored-by: aldousalvarez [email protected]
Co-authored-by: Peter Somogyvari <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
5 people authored and barnapa committed Jun 15, 2023
1 parent a2e2b50 commit 5320880
Showing 1 changed file with 125 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ export interface DeployContractSolidityBytecodeV1Request {
* @memberof DeployContractSolidityBytecodeV1Request
*/
'contractAbi'?: Array<any>;
/**
* The application binary interface of the solidity contract
* @type {Array<any>}
* @memberof DeployContractSolidityBytecodeV1Request
*/
contractAbi?: Array<any>;
/**
*
* @type {Web3SigningCredential}
Expand All @@ -183,6 +189,12 @@ export interface DeployContractSolidityBytecodeV1Request {
* @memberof DeployContractSolidityBytecodeV1Request
*/
'bytecode'?: string;
/**
* See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode
* @type {string}
* @memberof DeployContractSolidityBytecodeV1Request
*/
bytecode?: string;
/**
* The keychainId for retrieve the contracts json.
* @type {string}
Expand All @@ -200,19 +212,31 @@ export interface DeployContractSolidityBytecodeV1Request {
* @type {number}
* @memberof DeployContractSolidityBytecodeV1Request
*/
<<<<<<< HEAD
'gasPrice'?: number;
=======
gasPrice?: number;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {number}
* @memberof DeployContractSolidityBytecodeV1Request
*/
<<<<<<< HEAD
'nonce'?: number;
=======
nonce?: number;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {number}
* @memberof DeployContractSolidityBytecodeV1Request
*/
<<<<<<< HEAD
'value'?: number;
=======
value?: number;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
* The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.
* @type {number}
Expand All @@ -230,13 +254,21 @@ export interface DeployContractSolidityBytecodeV1Request {
* @type {Array<any>}
* @memberof DeployContractSolidityBytecodeV1Request
*/
<<<<<<< HEAD
'constructorArgs'?: Array<any>;
=======
constructorArgs?: Array<any>;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {QuorumPrivateTransactionConfig}
* @memberof DeployContractSolidityBytecodeV1Request
*/
<<<<<<< HEAD
'privateTransactionConfig'?: QuorumPrivateTransactionConfig;
=======
privateTransactionConfig?: QuorumPrivateTransactionConfig;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
}
/**
*
Expand Down Expand Up @@ -352,13 +384,21 @@ export interface InvokeContractJsonObjectV1Request {
* @type {ContractJSON}
* @memberof InvokeContractJsonObjectV1Request
*/
<<<<<<< HEAD
'contractJSON': ContractJSON;
=======
contractJSON: ContractJSON;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {QuorumPrivateTransactionConfig}
* @memberof InvokeContractJsonObjectV1Request
*/
<<<<<<< HEAD
'privateTransactionConfig'?: QuorumPrivateTransactionConfig;
=======
privateTransactionConfig?: QuorumPrivateTransactionConfig;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
}


Expand Down Expand Up @@ -625,6 +665,55 @@ export interface QuorumPrivateTransactionConfig {
*/
'privacyGroupId'?: string;
}
/**
*
* @export
* @interface QuorumPrivateTransactionConfig
*/
export interface QuorumPrivateTransactionConfig {
/**
*
* @type {string}
* @memberof QuorumPrivateTransactionConfig
*/
privateFrom?: string;
/**
*
* @type {Array<any>}
* @memberof QuorumPrivateTransactionConfig
*/
privateFor: Array<any>;
/**
*
* @type {boolean}
* @memberof QuorumPrivateTransactionConfig
*/
isPrivate?: boolean;
/**
*
* @type {number}
* @memberof QuorumPrivateTransactionConfig
*/
gasPrice?: number;
/**
*
* @type {number}
* @memberof QuorumPrivateTransactionConfig
*/
gasLimit?: number;
/**
*
* @type {string}
* @memberof QuorumPrivateTransactionConfig
*/
privateKey?: string;
/**
*
* @type {string}
* @memberof QuorumPrivateTransactionConfig
*/
privacyGroupId?: string;
}
/**
*
* @export
Expand Down Expand Up @@ -717,13 +806,21 @@ export interface RunTransactionRequest {
* @type {number}
* @memberof RunTransactionRequest
*/
<<<<<<< HEAD
'timeoutMs'?: number;
=======
timeoutMs?: number;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {QuorumPrivateTransactionConfig}
* @memberof RunTransactionRequest
*/
<<<<<<< HEAD
'privateTransactionConfig'?: QuorumPrivateTransactionConfig;
=======
privateTransactionConfig?: QuorumPrivateTransactionConfig;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
}
/**
*
Expand Down Expand Up @@ -1425,43 +1522,71 @@ export interface Web3TransactionReceipt {
* @type {string}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'to': string;
=======
to: string;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {Array<any>}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'logs'?: Array<any>;
=======
logs?: Array<any>;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {string}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'logsBloom'?: string;
=======
logsBloom?: string;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {string}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'revertReason'?: string;
=======
revertReason?: string;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {string}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'output'?: string;
=======
output?: string;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {string}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'commitmentHash'?: string;
=======
commitmentHash?: string;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
/**
*
* @type {number}
* @memberof Web3TransactionReceipt
*/
<<<<<<< HEAD
'cumulativeGasUSed'?: number;
=======
cumulativeGasUSed?: number;
>>>>>>> fe15a9e6 (feat(quorum): private transaction support)
}

/**
Expand Down

0 comments on commit 5320880

Please sign in to comment.