Package org.stellar.sdk.operations
Class InvokeHostFunctionOperation
java.lang.Object
org.stellar.sdk.operations.Operation
org.stellar.sdk.operations.InvokeHostFunctionOperation
Represents InvokeHostFunction operation.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<C extends InvokeHostFunctionOperation,
B extends InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<C, B>> Nested classes/interfaces inherited from class org.stellar.sdk.operations.Operation
Operation.OperationBuilder<C extends Operation,
B extends Operation.OperationBuilder<C, B>> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
createContractOperationBuilder
(byte[] wasmId, Address address, Collection<SCVal> constructorArgs, byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create contract.createContractOperationBuilder
(String wasmId, Address address, Collection<SCVal> constructorArgs, byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create contract.createStellarAssetContractOperationBuilder
(Address address, byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create a token contract wrapping a classic asset.This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create a token contract wrapping a classic asset.boolean
static InvokeHostFunctionOperation
Constructs a new InvokeHostFunctionOperation object from the XDR representation of theInvokeHostFunctionOperation
.@NonNull List
<SorobanAuthorizationEntry> getAuth()
The authorizations required to execute the host function@NonNull HostFunction
The host function to invoke.int
hashCode()
invokeContractFunctionOperationBuilder
(String contractId, String functionName, Collection<SCVal> parameters) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to invoke a contract function.toString()
uploadContractWasmOperationBuilder
(byte[] wasm) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to upload contract wasm.Methods inherited from class org.stellar.sdk.operations.Operation
fromXdr, getSourceAccount, setSourceAccount, toXdr, toXdrBase64
-
Method Details
-
fromXdr
Constructs a new InvokeHostFunctionOperation object from the XDR representation of theInvokeHostFunctionOperation
.- Parameters:
op
- the XDR representation of theInvokeHostFunctionOperation
.
-
uploadContractWasmOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> uploadContractWasmOperationBuilder(byte[] wasm) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to upload contract wasm.- Parameters:
wasm
- The wasm bytes to upload.- Returns:
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
-
createContractOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createContractOperationBuilder(String wasmId, Address address, @Nullable Collection<SCVal> constructorArgs, @Nullable byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create contract.- Parameters:
wasmId
- The hex-encoded wasm id to use for contract creation.address
- The address to use to derive the contract ID.constructorArgs
- The optional parameters to pass to the constructor of this contract.salt
- The 32-byte salt to use to derive the contract ID, if null, a random salt will be generated.- Returns:
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
-
createContractOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createContractOperationBuilder(byte[] wasmId, Address address, @Nullable Collection<SCVal> constructorArgs, @Nullable byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create contract.- Parameters:
wasmId
- The wasm id to use for contract creation.address
- The address to use to derive the contract ID.constructorArgs
- The optional parameters to pass to the constructor of this contract.salt
- The 32-byte salt to use to derive the contract ID, if null, a random salt will be generated.- Returns:
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
-
createStellarAssetContractOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createStellarAssetContractOperationBuilder(Asset asset) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create a token contract wrapping a classic asset.- Parameters:
asset
- The classic asset to wrap.- Returns:
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
-
createStellarAssetContractOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createStellarAssetContractOperationBuilder(Address address, @Nullable byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to create a token contract wrapping a classic asset.- Parameters:
address
- The address to use to derive the contract ID.salt
- The 32-byte salt to use to derive the contract ID, if null, a random salt will be generated.- Returns:
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
-
invokeContractFunctionOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> invokeContractFunctionOperationBuilder(String contractId, String functionName, @Nullable Collection<SCVal> parameters) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperation
to invoke a contract function.- Parameters:
contractId
- The ID of the contract to invoke.functionName
- The name of the function to invoke.parameters
- The parameters to pass to the method.- Returns:
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
- See Also:
-
builder
-
toBuilder
-
getHostFunction
The host function to invoke. -
getAuth
The authorizations required to execute the host function -
toString
-
equals
-
hashCode
public int hashCode()
-