Search in sources :

Example 1 with SCENARIO_PAYER_NAME

use of com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME in project hedera-services by hashgraph.

the class ValidationScenarios method fileScenario.

private static HapiApiSpec fileScenario() {
    try {
        ensureScenarios();
        if (scenarios.getFile() == null) {
            var fs = new FileScenario();
            fs.setPersistent(new PersistentFile());
            scenarios.setFile(fs);
        }
        var file = scenarios.getFile();
        return customHapiSpec("FileScenario").withProperties(Map.of("nodes", nodes(), "default.payer", primaryPayer(), "default.node", defaultNode(), "fees.useFixedOffer", "true", "fees.fixedOffer", "" + FEE_TO_OFFER, "startupAccounts.literal", payerKeystoreLiteral())).given(keyFromPem(() -> pemForAccount(targetNetwork().getScenarioPayer())).name(SCENARIO_PAYER_NAME).linkedTo(() -> String.format("0.0.%d", targetNetwork().getScenarioPayer())), ensureValidatedFileExistence(PERSISTENT_FILE_NAME, file.getPersistent().getContents(), pemForFile(persistentOrNegativeOne(file).getAsLong()), persistentOrNegativeOne(file), num -> file.getPersistent().setNum(num), loc -> file.getPersistent().setContents(loc))).when().then(novelFileIfDesired());
    } catch (Exception e) {
        log.warn("Unable to initialize file scenario, skipping it!", e);
        errorsOccurred.set(true);
        return null;
    }
}
Also used : Arrays(java.util.Arrays) LongSupplier(java.util.function.LongSupplier) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) ServicesConfigurationList(com.hederahashgraph.api.proto.java.ServicesConfigurationList) CryptoScenario(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario) UnaryOperator(java.util.function.UnaryOperator) KeyStoreException(java.security.KeyStoreException) ON(com.hedera.services.bdd.spec.keys.SigControl.ON) TxnVerbs.contractDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractDelete) ConsensusScenario(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) Matcher(java.util.regex.Matcher) Map(java.util.Map) KeyList(com.hederahashgraph.api.proto.java.KeyList) QueryVerbs.contractCallLocal(com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) BigInteger(java.math.BigInteger) DEFAULT_LUCKY_NUMBER(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_LUCKY_NUMBER) Files.readString(java.nio.file.Files.readString) DEFAULT_CONTRACT_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_CONTRACT_RESOURCE) FeeSnapshotsScenario(com.hedera.services.bdd.suites.utils.validation.domain.FeeSnapshotsScenario) EnumSet(java.util.EnumSet) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) TxnVerbs.contractCall(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCall) ControlForKey(com.hedera.services.bdd.spec.keys.ControlForKey) Property(org.yaml.snakeyaml.introspector.Property) ContractFnResultAsserts.resultWith(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith) Set(java.util.Set) TxnVerbs.submitMessageTo(com.hedera.services.bdd.spec.transactions.TxnVerbs.submitMessageTo) TransactionRecordAsserts.recordWith(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith) KeyFactory(com.hedera.services.bdd.spec.keys.KeyFactory) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) SYSTEM_KEYS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYSTEM_KEYS) QueryVerbs.getContractBytecode(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractBytecode) LEGACY_THROTTLES_FIRST_ORDER(com.hedera.services.bdd.suites.utils.sysfiles.serdes.JutilPropsToSvcCfgBytes.LEGACY_THROTTLES_FIRST_ORDER) PERSISTENT_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.PERSISTENT_TOPIC_NAME) TxnVerbs.tokenDissociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDissociate) PERSISTENT_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.PERSISTENT_FILE_NAME) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) SCENARIO_PAYER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) TopicID(com.hederahashgraph.api.proto.java.TopicID) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) QueryVerbs.getVersionInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getVersionInfo) UtilVerbs.balanceSnapshot(com.hedera.services.bdd.spec.utilops.UtilVerbs.balanceSnapshot) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) Setting(com.hederahashgraph.api.proto.java.Setting) UtilVerbs.keyFromPem(com.hedera.services.bdd.spec.utilops.UtilVerbs.keyFromPem) Network(com.hedera.services.bdd.suites.utils.validation.domain.Network) ArrayList(java.util.ArrayList) OptionalLong(java.util.OptionalLong) TxnVerbs.cryptoUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoUpdate) Payment(com.hedera.services.bdd.spec.fees.Payment) AccountID(com.hederahashgraph.api.proto.java.AccountID) SYS_FILES_UP(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_UP) NOVEL_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.NOVEL_CONTRACT_NAME) FileID(com.hederahashgraph.api.proto.java.FileID) LongStream(java.util.stream.LongStream) SysFileSerde(com.hedera.services.bdd.suites.utils.sysfiles.serdes.SysFileSerde) FILE(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FILE) Scenarios(com.hedera.services.bdd.suites.utils.validation.domain.Scenarios) Files(java.nio.file.Files) TxnVerbs.tokenFreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenFreeze) FileScenario(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario) Constructor(org.yaml.snakeyaml.constructor.Constructor) BufferedWriter(java.io.BufferedWriter) CONTRACT(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONTRACT) IOException(java.io.IOException) UtilVerbs.updateLargeFile(com.hedera.services.bdd.spec.utilops.UtilVerbs.updateLargeFile) HapiPropertySource(com.hedera.services.bdd.spec.HapiPropertySource) QueryVerbs.getFileInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileInfo) TransferListAsserts.includingDeduction(com.hedera.services.bdd.spec.assertions.TransferListAsserts.includingDeduction) TxnVerbs.burnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.burnToken) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) File(java.io.File) NodeTuple(org.yaml.snakeyaml.nodes.NodeTuple) AtomicLong(java.util.concurrent.atomic.AtomicLong) TxnVerbs.fileCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate) CommonUtils(com.swirlds.common.CommonUtils) OFF(com.hedera.services.bdd.spec.keys.SigControl.OFF) Paths(java.nio.file.Paths) ContractScenario(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario) TxnVerbs.tokenUnfreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUnfreeze) PersistentFile(com.hedera.services.bdd.suites.utils.validation.domain.PersistentFile) SigControl(com.hedera.services.bdd.spec.keys.SigControl) IntConsumer(java.util.function.IntConsumer) TxnVerbs.contractUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractUpdate) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) SYS_FILES_DOWN(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_DOWN) QueryVerbs.getContractInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractInfo) ContractID(com.hederahashgraph.api.proto.java.ContractID) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) SysFilesUpScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesUpScenario) Collectors.toMap(java.util.stream.Collectors.toMap) AccountInfoAsserts.changeFromSnapshot(com.hedera.services.bdd.spec.assertions.AccountInfoAsserts.changeFromSnapshot) FEE_SNAPSHOTS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FEE_SNAPSHOTS) VERSIONS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.VERSIONS) SENDER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.SENDER_NAME) NOVEL_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.NOVEL_TOPIC_NAME) PersistentContract(com.hedera.services.bdd.suites.utils.validation.domain.PersistentContract) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) HapiApiSpec.customHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.customHapiSpec) TxnVerbs.deleteTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.deleteTopic) DEFAULT_BYTECODE_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_BYTECODE_RESOURCE) Collectors(java.util.stream.Collectors) ByteString(com.google.protobuf.ByteString) UpdateAction(com.hedera.services.bdd.suites.utils.validation.domain.UpdateAction) List(java.util.List) Node(com.hedera.services.bdd.suites.utils.validation.domain.Node) TxnVerbs.grantTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.grantTokenKyc) TxnVerbs.tokenUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUpdate) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) SysFilesDownScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesDownScenario) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) TxnVerbs.wipeTokenAccount(com.hedera.services.bdd.spec.transactions.TxnVerbs.wipeTokenAccount) VersionInfoScenario(com.hedera.services.bdd.suites.utils.validation.domain.VersionInfoScenario) IntStream(java.util.stream.IntStream) TxnVerbs.fileDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileDelete) QueryVerbs.getAccountRecords(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountRecords) QueryVerbs.getTopicInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TxnVerbs.fileUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileUpdate) AtomicReference(java.util.concurrent.atomic.AtomicReference) INVALID_SIGNATURE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SIGNATURE) ContractResources(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources) PERSISTENT_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.PERSISTENT_CONTRACT_NAME) Yaml(org.yaml.snakeyaml.Yaml) TxnVerbs(com.hedera.services.bdd.spec.transactions.TxnVerbs) NOVEL_ACCOUNT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.NOVEL_ACCOUNT_NAME) ValidationConfig(com.hedera.services.bdd.suites.utils.validation.domain.ValidationConfig) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) TxnVerbs.cryptoDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoDelete) DEFAULT_CONTENTS_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.DEFAULT_CONTENTS_RESOURCE) TxnVerbs.fileAppend(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileAppend) KeyShape(com.hedera.services.bdd.spec.keys.KeyShape) TxnVerbs.revokeTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.revokeTokenKyc) TxnVerbs.mintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.mintToken) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) QueryVerbs.getFileContents(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileContents) SUITE_PASSED(com.hedera.services.bdd.suites.HapiApiSuite.FinalOutcome.SUITE_PASSED) TxnVerbs.updateTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.updateTopic) SYS_FILE_SERDES(com.hedera.services.bdd.suites.utils.sysfiles.serdes.StandardSerdes.SYS_FILE_SERDES) RECEIVER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.RECEIVER_NAME) Optional.ofNullable(java.util.Optional.ofNullable) QueryVerbs.getAccountBalance(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance) Tag(org.yaml.snakeyaml.nodes.Tag) SpecUtils(com.hedera.services.bdd.suites.utils.keypairs.SpecUtils) ContractFnResultAsserts.isLiteralResult(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.isLiteralResult) TRANSFERS_ONLY(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.TRANSFERS_ONLY) LongConsumer(java.util.function.LongConsumer) Consumer(java.util.function.Consumer) CRYPTO(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CRYPTO) Key(com.hederahashgraph.api.proto.java.Key) CONSENSUS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONSENSUS) Collectors.toList(java.util.stream.Collectors.toList) UtilVerbs(com.hedera.services.bdd.spec.utilops.UtilVerbs) Assertions(org.junit.jupiter.api.Assertions) Representer(org.yaml.snakeyaml.representer.Representer) TxnVerbs.contractCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCreate) LogManager(org.apache.logging.log4j.LogManager) NOVEL_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.NOVEL_FILE_NAME) FileScenario(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario) KeyStoreException(java.security.KeyStoreException) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) IOException(java.io.IOException) PersistentFile(com.hedera.services.bdd.suites.utils.validation.domain.PersistentFile)

Example 2 with SCENARIO_PAYER_NAME

use of com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME in project hedera-services by hashgraph.

the class ValidationScenarios method contractScenario.

private static HapiApiSpec contractScenario() {
    try {
        ensureScenarios();
        if (scenarios.getContract() == null) {
            var cs = new ContractScenario();
            cs.setPersistent(new PersistentContract());
            scenarios.setContract(cs);
        }
        var contract = scenarios.getContract();
        Object[] donationArgs = new Object[] { Integer.valueOf((int) targetNetwork().getBootstrap()), "Hey, Ma!" };
        return customHapiSpec("ContractScenario").withProperties(Map.of("nodes", nodes(), "default.payer", primaryPayer(), "default.node", defaultNode(), "fees.useFixedOffer", "true", "fees.fixedOffer", "" + FEE_TO_OFFER, "startupAccounts.literal", payerKeystoreLiteral())).given(keyFromPem(() -> pemForAccount(targetNetwork().getScenarioPayer())).name(SCENARIO_PAYER_NAME).linkedTo(() -> String.format("0.0.%d", targetNetwork().getScenarioPayer())), ensureValidatedContractExistence(PERSISTENT_CONTRACT_NAME, contract.getPersistent().getLuckyNo(), contract.getPersistent().getSource(), pemForContract(persistentContractOrNegativeOne(contract).getAsLong()), persistentContractOrNegativeOne(contract), num -> contract.getPersistent().setNum(num), bytecodeNum -> contract.getPersistent().setBytecode(bytecodeNum), luckyNo -> contract.getPersistent().setLuckyNo(luckyNo), loc -> contract.getPersistent().setSource(loc))).when(flattened(contractCall(PERSISTENT_CONTRACT_NAME).payingWith(SCENARIO_PAYER_NAME).setNodeFrom(ValidationScenarios::nextNode).sending(1L), contractCall(PERSISTENT_CONTRACT_NAME, ContractResources.CONSPICUOUS_DONATION_ABI, donationArgs).payingWith(SCENARIO_PAYER_NAME).setNodeFrom(ValidationScenarios::nextNode).via("donation"), getTxnRecord("donation").payingWith(SCENARIO_PAYER_NAME).setNodeFrom(ValidationScenarios::nextNode).logged().hasPriority(recordWith().transfers(includingDeduction(contract.getPersistent()::getNum, 1))), novelContractIfDesired(contract))).then();
    } catch (Exception e) {
        log.warn("Unable to initialize contract scenario, skipping it!", e);
        errorsOccurred.set(true);
        return null;
    }
}
Also used : Arrays(java.util.Arrays) LongSupplier(java.util.function.LongSupplier) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) ServicesConfigurationList(com.hederahashgraph.api.proto.java.ServicesConfigurationList) CryptoScenario(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario) UnaryOperator(java.util.function.UnaryOperator) KeyStoreException(java.security.KeyStoreException) ON(com.hedera.services.bdd.spec.keys.SigControl.ON) TxnVerbs.contractDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractDelete) ConsensusScenario(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) Matcher(java.util.regex.Matcher) Map(java.util.Map) KeyList(com.hederahashgraph.api.proto.java.KeyList) QueryVerbs.contractCallLocal(com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) BigInteger(java.math.BigInteger) DEFAULT_LUCKY_NUMBER(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_LUCKY_NUMBER) Files.readString(java.nio.file.Files.readString) DEFAULT_CONTRACT_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_CONTRACT_RESOURCE) FeeSnapshotsScenario(com.hedera.services.bdd.suites.utils.validation.domain.FeeSnapshotsScenario) EnumSet(java.util.EnumSet) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) TxnVerbs.contractCall(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCall) ControlForKey(com.hedera.services.bdd.spec.keys.ControlForKey) Property(org.yaml.snakeyaml.introspector.Property) ContractFnResultAsserts.resultWith(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith) Set(java.util.Set) TxnVerbs.submitMessageTo(com.hedera.services.bdd.spec.transactions.TxnVerbs.submitMessageTo) TransactionRecordAsserts.recordWith(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith) KeyFactory(com.hedera.services.bdd.spec.keys.KeyFactory) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) SYSTEM_KEYS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYSTEM_KEYS) QueryVerbs.getContractBytecode(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractBytecode) LEGACY_THROTTLES_FIRST_ORDER(com.hedera.services.bdd.suites.utils.sysfiles.serdes.JutilPropsToSvcCfgBytes.LEGACY_THROTTLES_FIRST_ORDER) PERSISTENT_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.PERSISTENT_TOPIC_NAME) TxnVerbs.tokenDissociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDissociate) PERSISTENT_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.PERSISTENT_FILE_NAME) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) SCENARIO_PAYER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) TopicID(com.hederahashgraph.api.proto.java.TopicID) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) QueryVerbs.getVersionInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getVersionInfo) UtilVerbs.balanceSnapshot(com.hedera.services.bdd.spec.utilops.UtilVerbs.balanceSnapshot) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) Setting(com.hederahashgraph.api.proto.java.Setting) UtilVerbs.keyFromPem(com.hedera.services.bdd.spec.utilops.UtilVerbs.keyFromPem) Network(com.hedera.services.bdd.suites.utils.validation.domain.Network) ArrayList(java.util.ArrayList) OptionalLong(java.util.OptionalLong) TxnVerbs.cryptoUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoUpdate) Payment(com.hedera.services.bdd.spec.fees.Payment) AccountID(com.hederahashgraph.api.proto.java.AccountID) SYS_FILES_UP(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_UP) NOVEL_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.NOVEL_CONTRACT_NAME) FileID(com.hederahashgraph.api.proto.java.FileID) LongStream(java.util.stream.LongStream) SysFileSerde(com.hedera.services.bdd.suites.utils.sysfiles.serdes.SysFileSerde) FILE(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FILE) Scenarios(com.hedera.services.bdd.suites.utils.validation.domain.Scenarios) Files(java.nio.file.Files) TxnVerbs.tokenFreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenFreeze) FileScenario(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario) Constructor(org.yaml.snakeyaml.constructor.Constructor) BufferedWriter(java.io.BufferedWriter) CONTRACT(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONTRACT) IOException(java.io.IOException) UtilVerbs.updateLargeFile(com.hedera.services.bdd.spec.utilops.UtilVerbs.updateLargeFile) HapiPropertySource(com.hedera.services.bdd.spec.HapiPropertySource) QueryVerbs.getFileInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileInfo) TransferListAsserts.includingDeduction(com.hedera.services.bdd.spec.assertions.TransferListAsserts.includingDeduction) TxnVerbs.burnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.burnToken) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) File(java.io.File) NodeTuple(org.yaml.snakeyaml.nodes.NodeTuple) AtomicLong(java.util.concurrent.atomic.AtomicLong) TxnVerbs.fileCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate) CommonUtils(com.swirlds.common.CommonUtils) OFF(com.hedera.services.bdd.spec.keys.SigControl.OFF) Paths(java.nio.file.Paths) ContractScenario(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario) TxnVerbs.tokenUnfreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUnfreeze) PersistentFile(com.hedera.services.bdd.suites.utils.validation.domain.PersistentFile) SigControl(com.hedera.services.bdd.spec.keys.SigControl) IntConsumer(java.util.function.IntConsumer) TxnVerbs.contractUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractUpdate) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) SYS_FILES_DOWN(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_DOWN) QueryVerbs.getContractInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractInfo) ContractID(com.hederahashgraph.api.proto.java.ContractID) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) SysFilesUpScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesUpScenario) Collectors.toMap(java.util.stream.Collectors.toMap) AccountInfoAsserts.changeFromSnapshot(com.hedera.services.bdd.spec.assertions.AccountInfoAsserts.changeFromSnapshot) FEE_SNAPSHOTS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FEE_SNAPSHOTS) VERSIONS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.VERSIONS) SENDER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.SENDER_NAME) NOVEL_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.NOVEL_TOPIC_NAME) PersistentContract(com.hedera.services.bdd.suites.utils.validation.domain.PersistentContract) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) HapiApiSpec.customHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.customHapiSpec) TxnVerbs.deleteTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.deleteTopic) DEFAULT_BYTECODE_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_BYTECODE_RESOURCE) Collectors(java.util.stream.Collectors) ByteString(com.google.protobuf.ByteString) UpdateAction(com.hedera.services.bdd.suites.utils.validation.domain.UpdateAction) List(java.util.List) Node(com.hedera.services.bdd.suites.utils.validation.domain.Node) TxnVerbs.grantTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.grantTokenKyc) TxnVerbs.tokenUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUpdate) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) SysFilesDownScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesDownScenario) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) TxnVerbs.wipeTokenAccount(com.hedera.services.bdd.spec.transactions.TxnVerbs.wipeTokenAccount) VersionInfoScenario(com.hedera.services.bdd.suites.utils.validation.domain.VersionInfoScenario) IntStream(java.util.stream.IntStream) TxnVerbs.fileDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileDelete) QueryVerbs.getAccountRecords(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountRecords) QueryVerbs.getTopicInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TxnVerbs.fileUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileUpdate) AtomicReference(java.util.concurrent.atomic.AtomicReference) INVALID_SIGNATURE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SIGNATURE) ContractResources(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources) PERSISTENT_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.PERSISTENT_CONTRACT_NAME) Yaml(org.yaml.snakeyaml.Yaml) TxnVerbs(com.hedera.services.bdd.spec.transactions.TxnVerbs) NOVEL_ACCOUNT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.NOVEL_ACCOUNT_NAME) ValidationConfig(com.hedera.services.bdd.suites.utils.validation.domain.ValidationConfig) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) TxnVerbs.cryptoDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoDelete) DEFAULT_CONTENTS_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.DEFAULT_CONTENTS_RESOURCE) TxnVerbs.fileAppend(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileAppend) KeyShape(com.hedera.services.bdd.spec.keys.KeyShape) TxnVerbs.revokeTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.revokeTokenKyc) TxnVerbs.mintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.mintToken) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) QueryVerbs.getFileContents(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileContents) SUITE_PASSED(com.hedera.services.bdd.suites.HapiApiSuite.FinalOutcome.SUITE_PASSED) TxnVerbs.updateTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.updateTopic) SYS_FILE_SERDES(com.hedera.services.bdd.suites.utils.sysfiles.serdes.StandardSerdes.SYS_FILE_SERDES) RECEIVER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.RECEIVER_NAME) Optional.ofNullable(java.util.Optional.ofNullable) QueryVerbs.getAccountBalance(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance) Tag(org.yaml.snakeyaml.nodes.Tag) SpecUtils(com.hedera.services.bdd.suites.utils.keypairs.SpecUtils) ContractFnResultAsserts.isLiteralResult(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.isLiteralResult) TRANSFERS_ONLY(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.TRANSFERS_ONLY) LongConsumer(java.util.function.LongConsumer) Consumer(java.util.function.Consumer) CRYPTO(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CRYPTO) Key(com.hederahashgraph.api.proto.java.Key) CONSENSUS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONSENSUS) Collectors.toList(java.util.stream.Collectors.toList) UtilVerbs(com.hedera.services.bdd.spec.utilops.UtilVerbs) Assertions(org.junit.jupiter.api.Assertions) Representer(org.yaml.snakeyaml.representer.Representer) TxnVerbs.contractCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCreate) LogManager(org.apache.logging.log4j.LogManager) NOVEL_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.NOVEL_FILE_NAME) ContractScenario(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario) PersistentContract(com.hedera.services.bdd.suites.utils.validation.domain.PersistentContract) KeyStoreException(java.security.KeyStoreException) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) IOException(java.io.IOException)

Example 3 with SCENARIO_PAYER_NAME

use of com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME in project hedera-services by hashgraph.

the class ValidationScenarios method appropriateQuery.

private static HapiSpecOperation appropriateQuery(SysFilesDownScenario sys, long fileNum) {
    String fid = String.format("0.0.%d", fileNum);
    SysFileSerde<String> serde = SYS_FILE_SERDES.get(fileNum);
    String fqn = params.getTargetNetwork() + "-" + serde.preferredFileName();
    String loc = "files/" + fqn;
    UnaryOperator<byte[]> preCompare = (fileNum == 121 || fileNum == 122) ? ValidationScenarios::asOrdered : bytes -> bytes;
    if (SysFilesDownScenario.COMPARE_EVAL_MODE.equals(sys.getEvalMode())) {
        String actualLoc = "files/actual-" + fqn;
        try {
            byte[] expected = serde.toRawFile(readString(Paths.get(loc)));
            return getFileContents(fid).payingWith(SCENARIO_PAYER_NAME).saveReadableTo(serde::fromRawFile, actualLoc).hasContents(spec -> expected).afterBytesTransform(preCompare);
        } catch (IOException e) {
            throw new IllegalStateException("Cannot read comparison file @ '" + loc + "'!", e);
        }
    } else if (SysFilesDownScenario.SNAPSHOT_EVAL_MODE.equals(sys.getEvalMode())) {
        return getFileContents(fid).payingWith(SCENARIO_PAYER_NAME).saveReadableTo(serde::fromRawFile, loc);
    } else {
        throw new IllegalArgumentException("No such sys files eval mode '" + sys.getEvalMode() + "'!");
    }
}
Also used : Arrays(java.util.Arrays) LongSupplier(java.util.function.LongSupplier) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) ServicesConfigurationList(com.hederahashgraph.api.proto.java.ServicesConfigurationList) CryptoScenario(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario) UnaryOperator(java.util.function.UnaryOperator) KeyStoreException(java.security.KeyStoreException) ON(com.hedera.services.bdd.spec.keys.SigControl.ON) TxnVerbs.contractDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractDelete) ConsensusScenario(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) Matcher(java.util.regex.Matcher) Map(java.util.Map) KeyList(com.hederahashgraph.api.proto.java.KeyList) QueryVerbs.contractCallLocal(com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) BigInteger(java.math.BigInteger) DEFAULT_LUCKY_NUMBER(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_LUCKY_NUMBER) Files.readString(java.nio.file.Files.readString) DEFAULT_CONTRACT_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_CONTRACT_RESOURCE) FeeSnapshotsScenario(com.hedera.services.bdd.suites.utils.validation.domain.FeeSnapshotsScenario) EnumSet(java.util.EnumSet) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) TxnVerbs.contractCall(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCall) ControlForKey(com.hedera.services.bdd.spec.keys.ControlForKey) Property(org.yaml.snakeyaml.introspector.Property) ContractFnResultAsserts.resultWith(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith) Set(java.util.Set) TxnVerbs.submitMessageTo(com.hedera.services.bdd.spec.transactions.TxnVerbs.submitMessageTo) TransactionRecordAsserts.recordWith(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith) KeyFactory(com.hedera.services.bdd.spec.keys.KeyFactory) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) SYSTEM_KEYS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYSTEM_KEYS) QueryVerbs.getContractBytecode(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractBytecode) LEGACY_THROTTLES_FIRST_ORDER(com.hedera.services.bdd.suites.utils.sysfiles.serdes.JutilPropsToSvcCfgBytes.LEGACY_THROTTLES_FIRST_ORDER) PERSISTENT_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.PERSISTENT_TOPIC_NAME) TxnVerbs.tokenDissociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDissociate) PERSISTENT_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.PERSISTENT_FILE_NAME) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) SCENARIO_PAYER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) TopicID(com.hederahashgraph.api.proto.java.TopicID) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) QueryVerbs.getVersionInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getVersionInfo) UtilVerbs.balanceSnapshot(com.hedera.services.bdd.spec.utilops.UtilVerbs.balanceSnapshot) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) Setting(com.hederahashgraph.api.proto.java.Setting) UtilVerbs.keyFromPem(com.hedera.services.bdd.spec.utilops.UtilVerbs.keyFromPem) Network(com.hedera.services.bdd.suites.utils.validation.domain.Network) ArrayList(java.util.ArrayList) OptionalLong(java.util.OptionalLong) TxnVerbs.cryptoUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoUpdate) Payment(com.hedera.services.bdd.spec.fees.Payment) AccountID(com.hederahashgraph.api.proto.java.AccountID) SYS_FILES_UP(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_UP) NOVEL_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.NOVEL_CONTRACT_NAME) FileID(com.hederahashgraph.api.proto.java.FileID) LongStream(java.util.stream.LongStream) SysFileSerde(com.hedera.services.bdd.suites.utils.sysfiles.serdes.SysFileSerde) FILE(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FILE) Scenarios(com.hedera.services.bdd.suites.utils.validation.domain.Scenarios) Files(java.nio.file.Files) TxnVerbs.tokenFreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenFreeze) FileScenario(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario) Constructor(org.yaml.snakeyaml.constructor.Constructor) BufferedWriter(java.io.BufferedWriter) CONTRACT(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONTRACT) IOException(java.io.IOException) UtilVerbs.updateLargeFile(com.hedera.services.bdd.spec.utilops.UtilVerbs.updateLargeFile) HapiPropertySource(com.hedera.services.bdd.spec.HapiPropertySource) QueryVerbs.getFileInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileInfo) TransferListAsserts.includingDeduction(com.hedera.services.bdd.spec.assertions.TransferListAsserts.includingDeduction) TxnVerbs.burnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.burnToken) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) File(java.io.File) NodeTuple(org.yaml.snakeyaml.nodes.NodeTuple) AtomicLong(java.util.concurrent.atomic.AtomicLong) TxnVerbs.fileCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate) CommonUtils(com.swirlds.common.CommonUtils) OFF(com.hedera.services.bdd.spec.keys.SigControl.OFF) Paths(java.nio.file.Paths) ContractScenario(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario) TxnVerbs.tokenUnfreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUnfreeze) PersistentFile(com.hedera.services.bdd.suites.utils.validation.domain.PersistentFile) SigControl(com.hedera.services.bdd.spec.keys.SigControl) IntConsumer(java.util.function.IntConsumer) TxnVerbs.contractUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractUpdate) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) SYS_FILES_DOWN(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_DOWN) QueryVerbs.getContractInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractInfo) ContractID(com.hederahashgraph.api.proto.java.ContractID) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) SysFilesUpScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesUpScenario) Collectors.toMap(java.util.stream.Collectors.toMap) AccountInfoAsserts.changeFromSnapshot(com.hedera.services.bdd.spec.assertions.AccountInfoAsserts.changeFromSnapshot) FEE_SNAPSHOTS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FEE_SNAPSHOTS) VERSIONS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.VERSIONS) SENDER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.SENDER_NAME) NOVEL_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.NOVEL_TOPIC_NAME) PersistentContract(com.hedera.services.bdd.suites.utils.validation.domain.PersistentContract) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) HapiApiSpec.customHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.customHapiSpec) TxnVerbs.deleteTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.deleteTopic) DEFAULT_BYTECODE_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_BYTECODE_RESOURCE) Collectors(java.util.stream.Collectors) ByteString(com.google.protobuf.ByteString) UpdateAction(com.hedera.services.bdd.suites.utils.validation.domain.UpdateAction) List(java.util.List) Node(com.hedera.services.bdd.suites.utils.validation.domain.Node) TxnVerbs.grantTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.grantTokenKyc) TxnVerbs.tokenUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUpdate) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) SysFilesDownScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesDownScenario) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) TxnVerbs.wipeTokenAccount(com.hedera.services.bdd.spec.transactions.TxnVerbs.wipeTokenAccount) VersionInfoScenario(com.hedera.services.bdd.suites.utils.validation.domain.VersionInfoScenario) IntStream(java.util.stream.IntStream) TxnVerbs.fileDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileDelete) QueryVerbs.getAccountRecords(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountRecords) QueryVerbs.getTopicInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TxnVerbs.fileUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileUpdate) AtomicReference(java.util.concurrent.atomic.AtomicReference) INVALID_SIGNATURE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SIGNATURE) ContractResources(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources) PERSISTENT_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.PERSISTENT_CONTRACT_NAME) Yaml(org.yaml.snakeyaml.Yaml) TxnVerbs(com.hedera.services.bdd.spec.transactions.TxnVerbs) NOVEL_ACCOUNT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.NOVEL_ACCOUNT_NAME) ValidationConfig(com.hedera.services.bdd.suites.utils.validation.domain.ValidationConfig) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) TxnVerbs.cryptoDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoDelete) DEFAULT_CONTENTS_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.DEFAULT_CONTENTS_RESOURCE) TxnVerbs.fileAppend(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileAppend) KeyShape(com.hedera.services.bdd.spec.keys.KeyShape) TxnVerbs.revokeTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.revokeTokenKyc) TxnVerbs.mintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.mintToken) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) QueryVerbs.getFileContents(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileContents) SUITE_PASSED(com.hedera.services.bdd.suites.HapiApiSuite.FinalOutcome.SUITE_PASSED) TxnVerbs.updateTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.updateTopic) SYS_FILE_SERDES(com.hedera.services.bdd.suites.utils.sysfiles.serdes.StandardSerdes.SYS_FILE_SERDES) RECEIVER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.RECEIVER_NAME) Optional.ofNullable(java.util.Optional.ofNullable) QueryVerbs.getAccountBalance(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance) Tag(org.yaml.snakeyaml.nodes.Tag) SpecUtils(com.hedera.services.bdd.suites.utils.keypairs.SpecUtils) ContractFnResultAsserts.isLiteralResult(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.isLiteralResult) TRANSFERS_ONLY(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.TRANSFERS_ONLY) LongConsumer(java.util.function.LongConsumer) Consumer(java.util.function.Consumer) CRYPTO(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CRYPTO) Key(com.hederahashgraph.api.proto.java.Key) CONSENSUS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONSENSUS) Collectors.toList(java.util.stream.Collectors.toList) UtilVerbs(com.hedera.services.bdd.spec.utilops.UtilVerbs) Assertions(org.junit.jupiter.api.Assertions) Representer(org.yaml.snakeyaml.representer.Representer) TxnVerbs.contractCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCreate) LogManager(org.apache.logging.log4j.LogManager) NOVEL_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.NOVEL_FILE_NAME) Files.readString(java.nio.file.Files.readString) ByteString(com.google.protobuf.ByteString) IOException(java.io.IOException)

Example 4 with SCENARIO_PAYER_NAME

use of com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME in project hedera-services by hashgraph.

the class ValidationScenarios method cryptoScenario.

private static HapiApiSpec cryptoScenario() {
    try {
        ensureScenarios();
        if (scenarios.getCrypto() == null) {
            scenarios.setCrypto(new CryptoScenario());
        }
        var crypto = scenarios.getCrypto();
        var transferFee = new AtomicLong(0);
        long expectedDelta = params.isNovelContent() ? 2L : 1L;
        return customHapiSpec("CryptoScenario").withProperties(Map.of("nodes", nodes(), "default.payer", primaryPayer(), "default.node", defaultNode(), "fees.useFixedOffer", "true", "fees.fixedOffer", "" + FEE_TO_OFFER, "startupAccounts.literal", payerKeystoreLiteral())).given(keyFromPem(() -> pemForAccount(targetNetwork().getScenarioPayer())).name(SCENARIO_PAYER_NAME).linkedTo(() -> String.format("0.0.%d", targetNetwork().getScenarioPayer())), ensureValidatedAccountExistence(SENDER_NAME, 2L, pemForAccount(senderOrNegativeOne(crypto).getAsLong()), senderOrNegativeOne(crypto), crypto::setSender), ensureValidatedAccountExistence(RECEIVER_NAME, 0L, pemForAccount(receiverOrNegativeOne(crypto).getAsLong()), receiverOrNegativeOne(crypto), crypto::setReceiver), balanceSnapshot("receiverBefore", RECEIVER_NAME)).when(flattened(cryptoTransfer(tinyBarsFromTo(SENDER_NAME, RECEIVER_NAME, 1L)).payingWith(SCENARIO_PAYER_NAME).setNodeFrom(ValidationScenarios::nextNode).via("transferTxn"), withOpContext((spec, opLog) -> {
            var lookup = getTxnRecord("transferTxn").payingWith(SCENARIO_PAYER_NAME).setNodeFrom(ValidationScenarios::nextNode).logged();
            allRunFor(spec, lookup);
            var record = lookup.getResponseRecord();
            transferFee.set(record.getTransactionFee());
        }), novelAccountIfDesired(transferFee))).then(getAccountBalance(RECEIVER_NAME).setNodeFrom(ValidationScenarios::nextNode).hasTinyBars(changeFromSnapshot("receiverBefore", expectedDelta)));
    } catch (Exception e) {
        log.warn("Unable to initialize crypto scenario, skipping it!", e);
        errorsOccurred.set(true);
        return null;
    }
}
Also used : Arrays(java.util.Arrays) LongSupplier(java.util.function.LongSupplier) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) ServicesConfigurationList(com.hederahashgraph.api.proto.java.ServicesConfigurationList) CryptoScenario(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario) UnaryOperator(java.util.function.UnaryOperator) KeyStoreException(java.security.KeyStoreException) ON(com.hedera.services.bdd.spec.keys.SigControl.ON) TxnVerbs.contractDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractDelete) ConsensusScenario(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) Matcher(java.util.regex.Matcher) Map(java.util.Map) KeyList(com.hederahashgraph.api.proto.java.KeyList) QueryVerbs.contractCallLocal(com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) BigInteger(java.math.BigInteger) DEFAULT_LUCKY_NUMBER(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_LUCKY_NUMBER) Files.readString(java.nio.file.Files.readString) DEFAULT_CONTRACT_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_CONTRACT_RESOURCE) FeeSnapshotsScenario(com.hedera.services.bdd.suites.utils.validation.domain.FeeSnapshotsScenario) EnumSet(java.util.EnumSet) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) TxnVerbs.contractCall(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCall) ControlForKey(com.hedera.services.bdd.spec.keys.ControlForKey) Property(org.yaml.snakeyaml.introspector.Property) ContractFnResultAsserts.resultWith(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith) Set(java.util.Set) TxnVerbs.submitMessageTo(com.hedera.services.bdd.spec.transactions.TxnVerbs.submitMessageTo) TransactionRecordAsserts.recordWith(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith) KeyFactory(com.hedera.services.bdd.spec.keys.KeyFactory) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) SYSTEM_KEYS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYSTEM_KEYS) QueryVerbs.getContractBytecode(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractBytecode) LEGACY_THROTTLES_FIRST_ORDER(com.hedera.services.bdd.suites.utils.sysfiles.serdes.JutilPropsToSvcCfgBytes.LEGACY_THROTTLES_FIRST_ORDER) PERSISTENT_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.PERSISTENT_TOPIC_NAME) TxnVerbs.tokenDissociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDissociate) PERSISTENT_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.PERSISTENT_FILE_NAME) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) SCENARIO_PAYER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.Network.SCENARIO_PAYER_NAME) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) TopicID(com.hederahashgraph.api.proto.java.TopicID) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) QueryVerbs.getVersionInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getVersionInfo) UtilVerbs.balanceSnapshot(com.hedera.services.bdd.spec.utilops.UtilVerbs.balanceSnapshot) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) Setting(com.hederahashgraph.api.proto.java.Setting) UtilVerbs.keyFromPem(com.hedera.services.bdd.spec.utilops.UtilVerbs.keyFromPem) Network(com.hedera.services.bdd.suites.utils.validation.domain.Network) ArrayList(java.util.ArrayList) OptionalLong(java.util.OptionalLong) TxnVerbs.cryptoUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoUpdate) Payment(com.hedera.services.bdd.spec.fees.Payment) AccountID(com.hederahashgraph.api.proto.java.AccountID) SYS_FILES_UP(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_UP) NOVEL_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.NOVEL_CONTRACT_NAME) FileID(com.hederahashgraph.api.proto.java.FileID) LongStream(java.util.stream.LongStream) SysFileSerde(com.hedera.services.bdd.suites.utils.sysfiles.serdes.SysFileSerde) FILE(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FILE) Scenarios(com.hedera.services.bdd.suites.utils.validation.domain.Scenarios) Files(java.nio.file.Files) TxnVerbs.tokenFreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenFreeze) FileScenario(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario) Constructor(org.yaml.snakeyaml.constructor.Constructor) BufferedWriter(java.io.BufferedWriter) CONTRACT(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONTRACT) IOException(java.io.IOException) UtilVerbs.updateLargeFile(com.hedera.services.bdd.spec.utilops.UtilVerbs.updateLargeFile) HapiPropertySource(com.hedera.services.bdd.spec.HapiPropertySource) QueryVerbs.getFileInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileInfo) TransferListAsserts.includingDeduction(com.hedera.services.bdd.spec.assertions.TransferListAsserts.includingDeduction) TxnVerbs.burnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.burnToken) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) File(java.io.File) NodeTuple(org.yaml.snakeyaml.nodes.NodeTuple) AtomicLong(java.util.concurrent.atomic.AtomicLong) TxnVerbs.fileCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate) CommonUtils(com.swirlds.common.CommonUtils) OFF(com.hedera.services.bdd.spec.keys.SigControl.OFF) Paths(java.nio.file.Paths) ContractScenario(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario) TxnVerbs.tokenUnfreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUnfreeze) PersistentFile(com.hedera.services.bdd.suites.utils.validation.domain.PersistentFile) SigControl(com.hedera.services.bdd.spec.keys.SigControl) IntConsumer(java.util.function.IntConsumer) TxnVerbs.contractUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractUpdate) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) SYS_FILES_DOWN(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.SYS_FILES_DOWN) QueryVerbs.getContractInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractInfo) ContractID(com.hederahashgraph.api.proto.java.ContractID) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) SysFilesUpScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesUpScenario) Collectors.toMap(java.util.stream.Collectors.toMap) AccountInfoAsserts.changeFromSnapshot(com.hedera.services.bdd.spec.assertions.AccountInfoAsserts.changeFromSnapshot) FEE_SNAPSHOTS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.FEE_SNAPSHOTS) VERSIONS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.VERSIONS) SENDER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.SENDER_NAME) NOVEL_TOPIC_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ConsensusScenario.NOVEL_TOPIC_NAME) PersistentContract(com.hedera.services.bdd.suites.utils.validation.domain.PersistentContract) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) HapiApiSpec.customHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.customHapiSpec) TxnVerbs.deleteTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.deleteTopic) DEFAULT_BYTECODE_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.DEFAULT_BYTECODE_RESOURCE) Collectors(java.util.stream.Collectors) ByteString(com.google.protobuf.ByteString) UpdateAction(com.hedera.services.bdd.suites.utils.validation.domain.UpdateAction) List(java.util.List) Node(com.hedera.services.bdd.suites.utils.validation.domain.Node) TxnVerbs.grantTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.grantTokenKyc) TxnVerbs.tokenUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUpdate) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) SysFilesDownScenario(com.hedera.services.bdd.suites.utils.validation.domain.SysFilesDownScenario) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) TxnVerbs.wipeTokenAccount(com.hedera.services.bdd.spec.transactions.TxnVerbs.wipeTokenAccount) VersionInfoScenario(com.hedera.services.bdd.suites.utils.validation.domain.VersionInfoScenario) IntStream(java.util.stream.IntStream) TxnVerbs.fileDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileDelete) QueryVerbs.getAccountRecords(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountRecords) QueryVerbs.getTopicInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TxnVerbs.fileUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileUpdate) AtomicReference(java.util.concurrent.atomic.AtomicReference) INVALID_SIGNATURE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_SIGNATURE) ContractResources(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources) PERSISTENT_CONTRACT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.ContractScenario.PERSISTENT_CONTRACT_NAME) Yaml(org.yaml.snakeyaml.Yaml) TxnVerbs(com.hedera.services.bdd.spec.transactions.TxnVerbs) NOVEL_ACCOUNT_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.NOVEL_ACCOUNT_NAME) ValidationConfig(com.hedera.services.bdd.suites.utils.validation.domain.ValidationConfig) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) TxnVerbs.cryptoDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoDelete) DEFAULT_CONTENTS_RESOURCE(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.DEFAULT_CONTENTS_RESOURCE) TxnVerbs.fileAppend(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileAppend) KeyShape(com.hedera.services.bdd.spec.keys.KeyShape) TxnVerbs.revokeTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.revokeTokenKyc) TxnVerbs.mintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.mintToken) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) QueryVerbs.getFileContents(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileContents) SUITE_PASSED(com.hedera.services.bdd.suites.HapiApiSuite.FinalOutcome.SUITE_PASSED) TxnVerbs.updateTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.updateTopic) SYS_FILE_SERDES(com.hedera.services.bdd.suites.utils.sysfiles.serdes.StandardSerdes.SYS_FILE_SERDES) RECEIVER_NAME(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario.RECEIVER_NAME) Optional.ofNullable(java.util.Optional.ofNullable) QueryVerbs.getAccountBalance(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance) Tag(org.yaml.snakeyaml.nodes.Tag) SpecUtils(com.hedera.services.bdd.suites.utils.keypairs.SpecUtils) ContractFnResultAsserts.isLiteralResult(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.isLiteralResult) TRANSFERS_ONLY(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.TRANSFERS_ONLY) LongConsumer(java.util.function.LongConsumer) Consumer(java.util.function.Consumer) CRYPTO(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CRYPTO) Key(com.hederahashgraph.api.proto.java.Key) CONSENSUS(com.hedera.services.bdd.suites.utils.validation.ValidationScenarios.Scenario.CONSENSUS) Collectors.toList(java.util.stream.Collectors.toList) UtilVerbs(com.hedera.services.bdd.spec.utilops.UtilVerbs) Assertions(org.junit.jupiter.api.Assertions) Representer(org.yaml.snakeyaml.representer.Representer) TxnVerbs.contractCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCreate) LogManager(org.apache.logging.log4j.LogManager) NOVEL_FILE_NAME(com.hedera.services.bdd.suites.utils.validation.domain.FileScenario.NOVEL_FILE_NAME) AtomicLong(java.util.concurrent.atomic.AtomicLong) CryptoScenario(com.hedera.services.bdd.suites.utils.validation.domain.CryptoScenario) KeyStoreException(java.security.KeyStoreException) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) IOException(java.io.IOException)

Aggregations

ByteString (com.google.protobuf.ByteString)4 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)4 HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)4 HapiApiSpec.customHapiSpec (com.hedera.services.bdd.spec.HapiApiSpec.customHapiSpec)4 HapiPropertySource (com.hedera.services.bdd.spec.HapiPropertySource)4 HapiSpecOperation (com.hedera.services.bdd.spec.HapiSpecOperation)4 AccountInfoAsserts.changeFromSnapshot (com.hedera.services.bdd.spec.assertions.AccountInfoAsserts.changeFromSnapshot)4 ContractFnResultAsserts.isLiteralResult (com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.isLiteralResult)4 ContractFnResultAsserts.resultWith (com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith)4 TransactionRecordAsserts.recordWith (com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith)4 TransferListAsserts.includingDeduction (com.hedera.services.bdd.spec.assertions.TransferListAsserts.includingDeduction)4 Payment (com.hedera.services.bdd.spec.fees.Payment)4 ContractResources (com.hedera.services.bdd.spec.infrastructure.meta.ContractResources)4 ControlForKey (com.hedera.services.bdd.spec.keys.ControlForKey)4 KeyFactory (com.hedera.services.bdd.spec.keys.KeyFactory)4 KeyShape (com.hedera.services.bdd.spec.keys.KeyShape)4 SigControl (com.hedera.services.bdd.spec.keys.SigControl)4 OFF (com.hedera.services.bdd.spec.keys.SigControl.OFF)4 ON (com.hedera.services.bdd.spec.keys.SigControl.ON)4 QueryVerbs.contractCallLocal (com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal)4