public class SorobanAuthorizedFunction extends java.lang.Object implements XdrElement
union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; };
Modifier and Type | Class and Description |
---|---|
static class |
SorobanAuthorizedFunction.SorobanAuthorizedFunctionBuilder |
Constructor and Description |
---|
SorobanAuthorizedFunction() |
SorobanAuthorizedFunction(SorobanAuthorizedFunctionType discriminant,
InvokeContractArgs contractFn,
CreateContractArgs createContractHostFn,
CreateContractArgsV2 createContractV2HostFn) |
toXdrBase64, toXdrByteArray
public SorobanAuthorizedFunction()
public SorobanAuthorizedFunction(SorobanAuthorizedFunctionType discriminant, InvokeContractArgs contractFn, CreateContractArgs createContractHostFn, CreateContractArgsV2 createContractV2HostFn)
public void encode(XdrDataOutputStream stream) throws java.io.IOException
encode
in interface XdrElement
java.io.IOException
public static SorobanAuthorizedFunction decode(XdrDataInputStream stream) throws java.io.IOException
java.io.IOException
public static SorobanAuthorizedFunction fromXdrBase64(java.lang.String xdr) throws java.io.IOException
java.io.IOException
public static SorobanAuthorizedFunction fromXdrByteArray(byte[] xdr) throws java.io.IOException
java.io.IOException
public static SorobanAuthorizedFunction.SorobanAuthorizedFunctionBuilder builder()
public SorobanAuthorizedFunction.SorobanAuthorizedFunctionBuilder toBuilder()
public SorobanAuthorizedFunctionType getDiscriminant()
public InvokeContractArgs getContractFn()
public CreateContractArgs getCreateContractHostFn()
public CreateContractArgsV2 getCreateContractV2HostFn()
public void setDiscriminant(SorobanAuthorizedFunctionType discriminant)
public void setContractFn(InvokeContractArgs contractFn)
public void setCreateContractHostFn(CreateContractArgs createContractHostFn)
public void setCreateContractV2HostFn(CreateContractArgsV2 createContractV2HostFn)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object