public class InvokeHostFunctionOperation extends Operation
Scv
Modifier and Type | Class and Description |
---|---|
static class |
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<C extends InvokeHostFunctionOperation,B extends InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<C,B>> |
Operation.OperationBuilder<C extends Operation,B extends Operation.OperationBuilder<C,B>>
Modifier and Type | Method and Description |
---|---|
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
builder() |
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
createContractOperationBuilder(byte[] wasmId,
Address address,
java.util.Collection<SCVal> constructorArgs,
byte[] salt)
This function will create an
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation to
create contract. |
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
createContractOperationBuilder(java.lang.String wasmId,
Address address,
java.util.Collection<SCVal> constructorArgs,
byte[] salt)
This function will create an
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation to
create contract. |
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
createStellarAssetContractOperationBuilder(Address address,
byte[] salt)
This function will create an
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation to
create a token contract wrapping a classic asset. |
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
createStellarAssetContractOperationBuilder(Asset asset)
This function will create an
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation to
create a token contract wrapping a classic asset. |
boolean |
equals(java.lang.Object o) |
static InvokeHostFunctionOperation |
fromXdr(InvokeHostFunctionOp op)
Constructs a new InvokeHostFunctionOperation object from the XDR representation of the
InvokeHostFunctionOperation . |
@NonNull java.util.List<SorobanAuthorizationEntry> |
getAuth()
The authorizations required to execute the host function
|
@NonNull HostFunction |
getHostFunction()
The host function to invoke.
|
int |
hashCode() |
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
invokeContractFunctionOperationBuilder(java.lang.String contractId,
java.lang.String functionName,
java.util.Collection<SCVal> parameters)
This function will create an
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation to
invoke a contract function. |
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
toBuilder() |
java.lang.String |
toString() |
static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> |
uploadContractWasmOperationBuilder(byte[] wasm)
This function will create an
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation to
upload contract wasm. |
formatAmountScale, fromXdr, fromXdrAmount, getSourceAccount, setSourceAccount, toXdr, toXdrAmount, toXdrBase64
public static InvokeHostFunctionOperation fromXdr(InvokeHostFunctionOp op)
InvokeHostFunctionOperation
.op
- the XDR representation of the InvokeHostFunctionOperation
.public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> uploadContractWasmOperationBuilder(byte[] wasm)
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation
to
upload contract wasm.wasm
- The wasm bytes to upload.InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createContractOperationBuilder(java.lang.String wasmId, Address address, @Nullable java.util.Collection<SCVal> constructorArgs, @Nullable byte[] salt)
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation
to
create contract.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.InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createContractOperationBuilder(byte[] wasmId, Address address, @Nullable java.util.Collection<SCVal> constructorArgs, @Nullable byte[] salt)
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation
to
create contract.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.InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createStellarAssetContractOperationBuilder(Asset asset)
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation
to
create a token contract wrapping a classic asset.asset
- The classic asset to wrap.InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> createStellarAssetContractOperationBuilder(Address address, @Nullable byte[] salt)
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation
to
create a token contract wrapping a classic asset.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.InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
public static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> invokeContractFunctionOperationBuilder(java.lang.String contractId, java.lang.String functionName, @Nullable java.util.Collection<SCVal> parameters)
InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
with the "hostFunction"
parameter preset, so that you can conveniently build an InvokeHostFunctionOperation
to
invoke a contract function.contractId
- The ID of the contract to invoke.functionName
- The name of the function to invoke.parameters
- The parameters to pass to the method.InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder
Scv
,
Interacting with Contractspublic static InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> builder()
public InvokeHostFunctionOperation.InvokeHostFunctionOperationBuilder<?,?> toBuilder()
@NonNull public @NonNull HostFunction getHostFunction()
@NonNull public @NonNull java.util.List<SorobanAuthorizationEntry> getAuth()
public java.lang.String toString()
toString
in class java.lang.Object