Search in sources :

Example 1 with SimpleStorage

use of com.quorum.gauge.sol.SimpleStorage in project quorum-acceptance-tests by ConsenSys.

the class PrivateRawSmartContractEthApi method makeDummyContract.

private SimpleStorage makeDummyContract(String contractAddress, TransactionReceipt transactionReceipt) {
    SimpleStorage c = SimpleStorage.load(contractAddress, null, (TransactionManager) null, null, null);
    c.setTransactionReceipt(transactionReceipt);
    return c;
}
Also used : SimpleStorage(com.quorum.gauge.sol.SimpleStorage)

Example 2 with SimpleStorage

use of com.quorum.gauge.sol.SimpleStorage in project quorum-acceptance-tests by ConsenSys.

the class StorageMasterService method createSSFromSM.

private Observable<SimpleStorage> createSSFromSM(final TransactionManager txManager, final Quorum client, final String contractAddress, final BigInteger gasLimit, final int newValue) {
    final BigInteger value = BigInteger.valueOf(newValue);
    StorageMaster storageMaster = StorageMaster.load(contractAddress, client, txManager, BigInteger.ZERO, gasLimit);
    return storageMaster.createSimpleStorage(value).flowable().toObservable().flatMap(receipt -> {
        final List<StorageMaster.ContractCreatedEventResponse> contractCreatedEvents = storageMaster.getContractCreatedEvents(receipt);
        if (contractCreatedEvents.size() < 1) {
            throw new RuntimeException("StorageMaster createSimpleStorage Receipt has no logs");
        }
        StorageMaster.ContractCreatedEventResponse contractCreatedEvent = contractCreatedEvents.get(0);
        SimpleStorage simpleStorage = SimpleStorage.load(contractCreatedEvent._addr, client, txManager, BigInteger.ZERO, gasLimit);
        simpleStorage.setTransactionReceipt(receipt);
        return Observable.just(simpleStorage);
    });
}
Also used : BigInteger(java.math.BigInteger) StorageMaster(com.quorum.gauge.sol.StorageMaster) SimpleStorage(com.quorum.gauge.sol.SimpleStorage)

Example 3 with SimpleStorage

use of com.quorum.gauge.sol.SimpleStorage in project quorum-acceptance-tests by ConsenSys.

the class FillTransaction method loadSimpleStorageContract.

private SimpleStorage loadSimpleStorageContract(String contractAddress, TransactionReceipt transactionReceipt) {
    SimpleStorage c = SimpleStorage.load(contractAddress, null, (TransactionManager) null, null, null);
    c.setTransactionReceipt(transactionReceipt);
    return c;
}
Also used : SimpleStorage(com.quorum.gauge.sol.SimpleStorage)

Aggregations

SimpleStorage (com.quorum.gauge.sol.SimpleStorage)3 StorageMaster (com.quorum.gauge.sol.StorageMaster)1 BigInteger (java.math.BigInteger)1