use of com.hedera.services.bdd.spec.transactions.file.HapiFileCreate in project hedera-services by hashgraph.
the class RandomContract method suggestedInitializers.
@Override
public List<HapiSpecOperation> suggestedInitializers() {
List<HapiSpecOperation> ops = new ArrayList<>();
for (SupportedContract choice : choices) {
HapiFileCreate op = fileCreate(fileFor(choice)).noLogging().path(choice.getPathToBytecode());
ops.add(op);
}
return ops;
}
use of com.hedera.services.bdd.spec.transactions.file.HapiFileCreate in project hedera-services by hashgraph.
the class HapiContractCreate method setBytecodeToDefaultContract.
private void setBytecodeToDefaultContract(HapiApiSpec spec) throws Throwable {
String implicitBytecodeFile = contract + "Bytecode";
HapiFileCreate fileCreate = TxnVerbs.fileCreate(implicitBytecodeFile).path(spec.setup().defaultContractPath());
Optional<Throwable> opError = fileCreate.execFor(spec);
if (opError.isPresent()) {
throw opError.get();
}
bytecodeFile = Optional.of(implicitBytecodeFile);
}
Aggregations