Class MethodCallTransactionBuilder<T extends MethodCallTransactionBuilder<T>>
- java.lang.Object
-
- com.algorand.algosdk.builder.transaction.TransactionParametersBuilder<T>
-
- com.algorand.algosdk.builder.transaction.MethodCallTransactionBuilder<T>
-
- All Implemented Interfaces:
ApplicationCallReferencesSetter<T>
,StateSchemaSetter<T>
,TEALProgramSetter<T>
public class MethodCallTransactionBuilder<T extends MethodCallTransactionBuilder<T>> extends TransactionParametersBuilder<T> implements StateSchemaSetter<T>, TEALProgramSetter<T>, ApplicationCallReferencesSetter<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected Long
appID
protected TEALProgram
approvalProgram
protected List<AppBoxReference>
boxReferences
protected TEALProgram
clearStateProgram
protected Long
extraPages
protected List<Address>
foreignAccounts
protected List<Long>
foreignApps
protected List<Long>
foreignAssets
protected StateSchema
globalStateSchema
protected StateSchema
localStateSchema
protected Method
method
protected List<Object>
methodArgs
protected Transaction.OnCompletion
onCompletion
protected TxnSigner
signer
-
Fields inherited from class com.algorand.algosdk.builder.transaction.TransactionParametersBuilder
fee, firstValid, flatFee, genesisHash, genesisID, lastValid, lease, note, rekeyTo, sender
-
-
Constructor Summary
Constructors Constructor Description MethodCallTransactionBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
accounts(List<Address> accounts)
Accounts lists the accounts (in addition to the sender) that may be accessed from the application logic.T
addMethodArgument(Object argument)
Specify arguments for the ABI method invocation.T
addMethodArguments(List<Object> arguments)
Specify arguments for the ABI method invocation.T
applicationId(Long applicationId)
ApplicationID is the application being interacted with, or 0 if creating a new application.T
approvalProgram(TEALProgram approvalProgram)
ApprovalProgram determines whether or not this ApplicationCall transaction will be approved or not.T
boxReferences(List<AppBoxReference> boxReferences)
BoxReferences lists the boxes whose state may be accessed during evaluation of this application call.MethodCallParams
build()
Build a MethodCallParams object.static MethodCallTransactionBuilder<?>
Builder()
Initialize aMethodCallTransactionBuilder
.T
clearStateProgram(TEALProgram clearStateProgram)
ClearStateProgram executes when a clear state ApplicationCall transaction is executed.T
extraPages(Long extraPages)
extraPages allows you to rent extra pages of memory for the application.T
foreignApps(List<Long> foreignApps)
ForeignApps lists the applications (in addition to txn.ApplicationID) whose global states may be accessed by this application.T
foreignAssets(List<Long> foreignAssets)
ForeignAssets lists the assets whose global states may be accessed by this application.T
globalStateSchema(StateSchema globalStateSchema)
GlobalStateSchema sets limits on the number of strings and integers that may be stored in the GlobalState.T
localStateSchema(StateSchema localStateSchema)
LocalStateSchema sets limits on the number of strings and integers that may be stored in an account's LocalState.T
method(Method method)
Specify the ABI method that this method call transaction will invoke.T
methodArguments(List<Object> arguments)
Specify arguments for the ABI method invocation.T
onComplete(Transaction.OnCompletion op)
This is the faux application type used to distinguish different application actions.T
signer(TxnSigner signer)
Specify the signer for this method call transaction.-
Methods inherited from class com.algorand.algosdk.builder.transaction.TransactionParametersBuilder
fee, fee, fee, firstValid, firstValid, firstValid, flatFee, flatFee, flatFee, genesisHash, genesisHash, genesisHashB64, genesisHashUTF8, genesisID, lastValid, lastValid, lastValid, lease, lease, leaseB64, leaseUTF8, lookupParams, note, noteB64, noteUTF8, rekey, rekey, rekey, sender, sender, sender, suggestedParams
-
-
-
-
Field Detail
-
appID
protected Long appID
-
onCompletion
protected Transaction.OnCompletion onCompletion
-
method
protected Method method
-
boxReferences
protected List<AppBoxReference> boxReferences
-
approvalProgram
protected TEALProgram approvalProgram
-
clearStateProgram
protected TEALProgram clearStateProgram
-
localStateSchema
protected StateSchema localStateSchema
-
globalStateSchema
protected StateSchema globalStateSchema
-
extraPages
protected Long extraPages
-
signer
protected TxnSigner signer
-
-
Method Detail
-
Builder
public static MethodCallTransactionBuilder<?> Builder()
Initialize aMethodCallTransactionBuilder
.
-
applicationId
public T applicationId(Long applicationId)
Description copied from interface:ApplicationCallReferencesSetter
ApplicationID is the application being interacted with, or 0 if creating a new application.- Specified by:
applicationId
in interfaceApplicationCallReferencesSetter<T extends MethodCallTransactionBuilder<T>>
-
onComplete
public T onComplete(Transaction.OnCompletion op)
This is the faux application type used to distinguish different application actions. Specifically, OnCompletion specifies what side effects this transaction will have if it successfully makes it into a block.
-
method
public T method(Method method)
Specify the ABI method that this method call transaction will invoke.
-
methodArguments
public T methodArguments(List<Object> arguments)
Specify arguments for the ABI method invocation.This will reset the arguments list to what is passed in by the caller.
-
addMethodArguments
public T addMethodArguments(List<Object> arguments)
Specify arguments for the ABI method invocation.This will add the arguments passed in by the caller to the existing list of arguments.
-
addMethodArgument
public T addMethodArgument(Object argument)
Specify arguments for the ABI method invocation.This will add the argument passed in by the caller to the existing list of arguments.
-
accounts
public T accounts(List<Address> accounts)
Description copied from interface:ApplicationCallReferencesSetter
Accounts lists the accounts (in addition to the sender) that may be accessed from the application logic.- Specified by:
accounts
in interfaceApplicationCallReferencesSetter<T extends MethodCallTransactionBuilder<T>>
-
foreignApps
public T foreignApps(List<Long> foreignApps)
Description copied from interface:ApplicationCallReferencesSetter
ForeignApps lists the applications (in addition to txn.ApplicationID) whose global states may be accessed by this application. The access is read-only.- Specified by:
foreignApps
in interfaceApplicationCallReferencesSetter<T extends MethodCallTransactionBuilder<T>>
-
foreignAssets
public T foreignAssets(List<Long> foreignAssets)
Description copied from interface:ApplicationCallReferencesSetter
ForeignAssets lists the assets whose global states may be accessed by this application. The access is read-only.- Specified by:
foreignAssets
in interfaceApplicationCallReferencesSetter<T extends MethodCallTransactionBuilder<T>>
-
boxReferences
public T boxReferences(List<AppBoxReference> boxReferences)
Description copied from interface:ApplicationCallReferencesSetter
BoxReferences lists the boxes whose state may be accessed during evaluation of this application call. The apps the boxes belong to must be present in ForeignApps.- Specified by:
boxReferences
in interfaceApplicationCallReferencesSetter<T extends MethodCallTransactionBuilder<T>>
-
approvalProgram
public T approvalProgram(TEALProgram approvalProgram)
Description copied from interface:TEALProgramSetter
ApprovalProgram determines whether or not this ApplicationCall transaction will be approved or not.- Specified by:
approvalProgram
in interfaceTEALProgramSetter<T extends MethodCallTransactionBuilder<T>>
-
clearStateProgram
public T clearStateProgram(TEALProgram clearStateProgram)
Description copied from interface:TEALProgramSetter
ClearStateProgram executes when a clear state ApplicationCall transaction is executed. This program may not reject the transaction, only update state.- Specified by:
clearStateProgram
in interfaceTEALProgramSetter<T extends MethodCallTransactionBuilder<T>>
-
localStateSchema
public T localStateSchema(StateSchema localStateSchema)
Description copied from interface:StateSchemaSetter
LocalStateSchema sets limits on the number of strings and integers that may be stored in an account's LocalState. for this application. The larger these limits are, the larger minimum balance must be maintained inside the account of any users who opt into this application. The LocalStateSchema is immutable.- Specified by:
localStateSchema
in interfaceStateSchemaSetter<T extends MethodCallTransactionBuilder<T>>
-
globalStateSchema
public T globalStateSchema(StateSchema globalStateSchema)
Description copied from interface:StateSchemaSetter
GlobalStateSchema sets limits on the number of strings and integers that may be stored in the GlobalState. The larger these limits are, the larger minimum balance must be maintained inside the creator's account (in order to 'pay' for the state that can be used). The GlobalStateSchema is immutable.- Specified by:
globalStateSchema
in interfaceStateSchemaSetter<T extends MethodCallTransactionBuilder<T>>
-
extraPages
public T extraPages(Long extraPages)
Description copied from interface:StateSchemaSetter
extraPages allows you to rent extra pages of memory for the application. Each page is 2048 bytes of shared memory between approval and clear state programs. extraPages parameter must be an integer between 0 and 3 inclusive.- Specified by:
extraPages
in interfaceStateSchemaSetter<T extends MethodCallTransactionBuilder<T>>
-
build
public MethodCallParams build()
Build a MethodCallParams object.
-
-