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
Nested ClassesModifier and TypeClassDescriptionstatic classInvokeHostFunctionOperation.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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto create contract.createContractOperationBuilder(String wasmId, Address address, Collection<SCVal> constructorArgs, byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto create contract.createStellarAssetContractOperationBuilder(Address address, byte[] salt) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto create a token contract wrapping a classic asset.This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto create a token contract wrapping a classic asset.booleanstatic InvokeHostFunctionOperationConstructs a new InvokeHostFunctionOperation object from the XDR representation of theInvokeHostFunctionOperation.@NonNull List<SorobanAuthorizationEntry> getAuth()The authorizations required to execute the host function@NonNull HostFunctionThe host function to invoke.inthashCode()invokeContractFunctionOperationBuilder(String contractId, String functionName, Collection<SCVal> parameters) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto invoke a contract function.toString()uploadContractWasmOperationBuilder(byte[] wasm) This function will create anInvokeHostFunctionOperation.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto upload contract wasm.Methods inherited from class org.stellar.sdk.operations.Operation
formatAmountScale, fromXdr, fromXdrAmount, getSourceAccount, setSourceAccount, toXdr, toXdrAmount, 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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto 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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto 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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto 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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto 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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto 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.InvokeHostFunctionOperationBuilderwith the "hostFunction" parameter preset, so that you can conveniently build anInvokeHostFunctionOperationto 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()
-