Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class SmartContractServiceGrpc.SmartContractServiceFutureStub
java.lang.Object
io.grpc.stub.AbstractStub<SmartContractServiceGrpc.SmartContractServiceFutureStub>
io.grpc.stub.AbstractFutureStub<SmartContractServiceGrpc.SmartContractServiceFutureStub>
com.hedera.hashgraph.sdk.proto.SmartContractServiceGrpc.SmartContractServiceFutureStub
- Enclosing class:
SmartContractServiceGrpc
public static final class SmartContractServiceGrpc.SmartContractServiceFutureStub
extends io.grpc.stub.AbstractFutureStub<SmartContractServiceGrpc.SmartContractServiceFutureStub>
A stub to allow clients to do ListenableFuture-style rpc calls to service SmartContractService.
The Hedera Smart Contract Service (HSCS) provides an interface to an EVM compatible environment to create, store, manage, and execute smart contract calls. Smart Contracts implement useful and often highly complex interactions between individuals, systems, and the distributed ledger.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) com.google.common.util.concurrent.ListenableFuture<TransactionResponse> callEthereum(Transaction request) Make an Ethereum transaction "call" with all data in Ethereum formats, including the contract alias.com.google.common.util.concurrent.ListenableFuture<Response> contractCallLocalMethod(Query request) Call a query function of a given smart contract, providing function parameter inputs as needed.<br/> This is performed locally on the particular node that the client is communicating with.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> contractCallMethod(Transaction request) Call a function of a given smart contract, providing function parameter inputs as needed.com.google.common.util.concurrent.ListenableFuture<Response> contractGetBytecode(Query request) A standard query to read the current bytecode for a smart contract.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> createContract(Transaction request) Create a new smart contract.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> deleteContract(Transaction request) Delete a smart contract, and transfer any remaining HBAR balance to a designated account.com.google.common.util.concurrent.ListenableFuture<Response> getBySolidityID(Query request) Deprecated.com.google.common.util.concurrent.ListenableFuture<Response> getContractInfo(Query request) A standard query to obtain detailed information for a smart contract.com.google.common.util.concurrent.ListenableFuture<Response> getTxRecordByContractID(Query request) Deprecated.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> hookStore(Transaction request) Update zero or more slots of an EVM hook's storage.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> systemDelete(Transaction request) Deprecated.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> systemUndelete(Transaction request) Deprecated.com.google.common.util.concurrent.ListenableFuture<TransactionResponse> updateContract(Transaction request) Modify a smart contract.<br/> Any change other than updating the expiration time requires that the contract be modifiable (has a valid `adminKey`) and that the transaction be signed by the `adminKey` <p> Fields _not set_ on the request SHALL NOT be modified.Methods inherited from class io.grpc.stub.AbstractFutureStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected SmartContractServiceGrpc.SmartContractServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<SmartContractServiceGrpc.SmartContractServiceFutureStub>
-
createContract
public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> createContract(Transaction request) Create a new smart contract. <p> If this transaction succeeds, the `ContractID` for the new smart contract SHALL be set in the transaction receipt.<br/> The contract is defined by the initial bytecode (or `initcode`). The `initcode` SHALL be provided either in a previously created file, or in the transaction body itself for very small contracts.<br/> As part of contract creation, the constructor defined for the new smart contract SHALL run with the parameters provided in the `constructorParameters` field.<br/> The gas to "power" that constructor MUST be provided via the `gas` field, and SHALL be charged to the payer for this transaction.<br/> If the contract _constructor_ stores information, it is charged gas for that storage. There is a separate fee in HBAR to maintain that storage until the expiration, and that fee SHALL be added to this transaction as part of the _transaction fee_, rather than gas.
-
updateContract
public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> updateContract(Transaction request) Modify a smart contract.<br/> Any change other than updating the expiration time requires that the contract be modifiable (has a valid `adminKey`) and that the transaction be signed by the `adminKey` <p> Fields _not set_ on the request SHALL NOT be modified.
-
contractCallMethod
public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> contractCallMethod(Transaction request) Call a function of a given smart contract, providing function parameter inputs as needed. <p> Resource ("gas") charges SHALL include all relevant fees incurred by the contract execution, including any storage required.<br/> The total transaction fee SHALL incorporate all of the "gas" actually consumed as well as the standard fees for transaction handling, data transfers, signature verification, etc... -
contractCallLocalMethod
public com.google.common.util.concurrent.ListenableFuture<Response> contractCallLocalMethod(Query request) Call a query function of a given smart contract, providing function parameter inputs as needed.<br/> This is performed locally on the particular node that the client is communicating with. Executing the call locally is faster and less costly, but imposes certain restrictions. <p> The call MUST NOT change the state of the contract instance. This also precludes any expenditure or transfer of HBAR or other tokens.<br/> The call SHALL NOT have a separate consensus timestamp.<br/> The call SHALL NOT generate a record nor a receipt.<br/> The response SHALL contain the output returned by the function call.<br/> <p> This is generally useful for calling accessor functions which read (query) state without changes or side effects. Any contract call that would use the `STATICCALL` opcode MAY be called via contract call local with performance and cost benefits. <p> Unlike a ContractCall transaction, the node SHALL always consume the _entire_ amount of offered "gas" in determining the fee for this query, so accurate gas estimation is important.
-
getContractInfo
A standard query to obtain detailed information for a smart contract.
-
contractGetBytecode
public com.google.common.util.concurrent.ListenableFuture<Response> contractGetBytecode(Query request) A standard query to read the current bytecode for a smart contract.
-
getBySolidityID
@Deprecated public com.google.common.util.concurrent.ListenableFuture<Response> getBySolidityID(Query request) Deprecated.A standard query to obtain account and contract identifiers for a smart contract, given the Solidity identifier for that contract.
-
getTxRecordByContractID
@Deprecated public com.google.common.util.concurrent.ListenableFuture<Response> getTxRecordByContractID(Query request) Deprecated.<blockquote>This query is no longer supported.</blockquote> This query always returned an empty record list.
-
deleteContract
public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> deleteContract(Transaction request) Delete a smart contract, and transfer any remaining HBAR balance to a designated account. <p> If this call succeeds then all subsequent calls to that smart contract SHALL fail.<br/>
-
systemDelete
@Deprecated public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> systemDelete(Transaction request) Deprecated.Delete a smart contract, as a system-initiated deletion, this SHALL NOT transfer balances. <blockquote> This call is an administrative function of the Hedera network, and SHALL require network administration authorization.<br/> This transaction MUST be signed by one of the network administration accounts (typically `0.0.2` through `0.0.59`, as defined in the `api-permission.properties` file). </blockquote> If this call succeeds then all subsequent calls to that smart contract SHALL fail.<br/>
-
systemUndelete
@Deprecated public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> systemUndelete(Transaction request) Deprecated.Un-Delete a smart contract, returning it (mostly) to its state prior to deletion. <p> The contract to be restored MUST have been deleted via `systemDelete`. If the contract was deleted via `deleteContract`, it SHALL NOT be recoverable. <blockquote> This call is an administrative function of the Hedera network, and SHALL require network administration authorization.<br/> This transaction MUST be signed by one of the network administration accounts (typically `0.0.2` through `0.0.59`, as defined in the `api-permission.properties` file). </blockquote> If this call succeeds then subsequent calls to that smart contract MAY succeed.<br/>
-
callEthereum
public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> callEthereum(Transaction request) Make an Ethereum transaction "call" with all data in Ethereum formats, including the contract alias. <p> Call data MAY be in the transaction, or stored within a "File".<br/> The caller MAY offer additional gas above what is offered in the call data, but MAY be charged up to 80% of that value if the amount required is less than this "floor" amount.
-
hookStore
public com.google.common.util.concurrent.ListenableFuture<TransactionResponse> hookStore(Transaction request) Update zero or more slots of an EVM hook's storage.
-