Search in sources :

Example 1 with Quorum

use of org.web3j.quorum.Quorum in project quorum-acceptance-tests by ConsenSys.

the class PermissionService method removeRole.

public Observable<ExecStatusInfo> removeRole(QuorumNetworkProperty.Node node, String org, String role) {
    Quorum client = connectionFactory().getConnection(node);
    String fromAccount = accountService.getDefaultAccountAddress(node).blockingFirst();
    return client.quorumPermissionRemoveRole(org, role, new PrivateTransaction(fromAccount, null, DEFAULT_GAS_LIMIT, null, BigInteger.ZERO, null, null, null)).flowable().toObservable();
}
Also used : PrivateTransaction(org.web3j.quorum.methods.request.PrivateTransaction) Quorum(org.web3j.quorum.Quorum)

Example 2 with Quorum

use of org.web3j.quorum.Quorum in project quorum-acceptance-tests by ConsenSys.

the class PermissionService method updateOrgStatus.

public Observable<ExecStatusInfo> updateOrgStatus(QuorumNetworkProperty.Node node, String org, int status) {
    Quorum client = connectionFactory().getConnection(node);
    String fromAccount = accountService.getDefaultAccountAddress(node).blockingFirst();
    return client.quorumPermissionUpdateOrgStatus(org, status, new PrivateTransaction(fromAccount, null, DEFAULT_GAS_LIMIT, null, BigInteger.ZERO, null, null, null)).flowable().toObservable();
}
Also used : PrivateTransaction(org.web3j.quorum.methods.request.PrivateTransaction) Quorum(org.web3j.quorum.Quorum)

Example 3 with Quorum

use of org.web3j.quorum.Quorum in project quorum-acceptance-tests by ConsenSys.

the class PermissionService method recoverBlacklistedNode.

public Observable<ExecStatusInfo> recoverBlacklistedNode(QuorumNetworkProperty.Node node, String org, String enode) {
    Quorum client = connectionFactory().getConnection(node);
    String fromAccount = accountService.getDefaultAccountAddress(node).blockingFirst();
    return client.quorumPermissionRecoverBlackListedNode(org, enode, new PrivateTransaction(fromAccount, null, DEFAULT_GAS_LIMIT, null, BigInteger.ZERO, null, null, null)).flowable().toObservable();
}
Also used : PrivateTransaction(org.web3j.quorum.methods.request.PrivateTransaction) Quorum(org.web3j.quorum.Quorum)

Example 4 with Quorum

use of org.web3j.quorum.Quorum in project quorum-acceptance-tests by ConsenSys.

the class PermissionService method updateNode.

public Observable<ExecStatusInfo> updateNode(QuorumNetworkProperty.Node node, String org, String enode, int status) {
    Quorum client = connectionFactory().getConnection(node);
    String fromAccount = accountService.getDefaultAccountAddress(node).blockingFirst();
    return client.quorumPermissionUpdateNodeStatus(org, enode, status, new PrivateTransaction(fromAccount, null, DEFAULT_GAS_LIMIT, null, BigInteger.ZERO, null, null, null)).flowable().toObservable();
}
Also used : PrivateTransaction(org.web3j.quorum.methods.request.PrivateTransaction) Quorum(org.web3j.quorum.Quorum)

Example 5 with Quorum

use of org.web3j.quorum.Quorum in project quorum-acceptance-tests by ConsenSys.

the class PermissionService method approveAdminRoleAssignment.

public Observable<ExecStatusInfo> approveAdminRoleAssignment(QuorumNetworkProperty.Node node, String address, String org) {
    Quorum client = connectionFactory().getConnection(node);
    String fromAccount = accountService.getDefaultAccountAddress(node).blockingFirst();
    return client.quorumPermissionApproveAdminRole(org, address, new PrivateTransaction(fromAccount, null, DEFAULT_GAS_LIMIT, null, BigInteger.ZERO, null, null, null)).flowable().toObservable();
}
Also used : PrivateTransaction(org.web3j.quorum.methods.request.PrivateTransaction) Quorum(org.web3j.quorum.Quorum)

Aggregations

Quorum (org.web3j.quorum.Quorum)61 ReadonlyTransactionManager (org.web3j.tx.ReadonlyTransactionManager)33 ContractCallException (org.web3j.tx.exceptions.ContractCallException)32 PrivateClientTransactionManager (com.quorum.gauge.ext.PrivateClientTransactionManager)30 PrivateTransaction (org.web3j.quorum.methods.request.PrivateTransaction)29 BigInteger (java.math.BigInteger)25 TransactionManager (org.web3j.tx.TransactionManager)24 QuorumNetworkProperty (com.quorum.gauge.common.QuorumNetworkProperty)23 Observable (io.reactivex.Observable)23 IOException (java.io.IOException)23 Collectors (java.util.stream.Collectors)23 Autowired (org.springframework.beans.factory.annotation.Autowired)23 Service (org.springframework.stereotype.Service)23 Logger (org.slf4j.Logger)22 LoggerFactory (org.slf4j.LoggerFactory)22 Contract (org.web3j.tx.Contract)22 QuorumNode (com.quorum.gauge.common.QuorumNode)21 DefaultBlockParameterName (org.web3j.protocol.core.DefaultBlockParameterName)19 Request (org.web3j.protocol.core.Request)19 FunctionEncoder (org.web3j.abi.FunctionEncoder)18