Package org.stellar.sdk.xdr
Class SorobanAuthorizedFunction
java.lang.Object
org.stellar.sdk.xdr.SorobanAuthorizedFunction
- All Implemented Interfaces:
XdrElement
SorobanAuthorizedFunction's original definition in the XDR file is:
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;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionSorobanAuthorizedFunction(SorobanAuthorizedFunctionType discriminant, InvokeContractArgs contractFn, CreateContractArgs createContractHostFn, CreateContractArgsV2 createContractV2HostFn) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SorobanAuthorizedFunctiondecode(XdrDataInputStream stream) voidencode(XdrDataOutputStream stream) booleanstatic SorobanAuthorizedFunctionfromXdrBase64(String xdr) static SorobanAuthorizedFunctionfromXdrByteArray(byte[] xdr) inthashCode()voidsetContractFn(InvokeContractArgs contractFn) voidsetCreateContractHostFn(CreateContractArgs createContractHostFn) voidsetCreateContractV2HostFn(CreateContractArgsV2 createContractV2HostFn) voidsetDiscriminant(SorobanAuthorizedFunctionType discriminant) toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SorobanAuthorizedFunction
public SorobanAuthorizedFunction() -
SorobanAuthorizedFunction
public SorobanAuthorizedFunction(SorobanAuthorizedFunctionType discriminant, InvokeContractArgs contractFn, CreateContractArgs createContractHostFn, CreateContractArgsV2 createContractV2HostFn)
-
-
Method Details
-
encode
- Specified by:
encodein interfaceXdrElement- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getContractFn
-
getCreateContractHostFn
-
getCreateContractV2HostFn
-
setDiscriminant
-
setContractFn
-
setCreateContractHostFn
-
setCreateContractV2HostFn
-
equals
-
hashCode
public int hashCode() -
toString
-