Algorand TypeScript
    Preparing search index...

    Type Alias AbiMethodConfig<TContract>

    Configuration options for an abi method

    type AbiMethodConfig<TContract extends Contract> = {
        allowActions?: OnCompleteActionStr | OnCompleteActionStr[];
        defaultArguments?: Record<string, DefaultArgument<TContract>>;
        name?: string;
        onCreate?: CreateOptions;
        readonly?: boolean;
        resourceEncoding?: ResourceEncodingOptions;
        validateEncoding?: ValidateEncodingOptions;
    }

    Type Parameters

    • TContract extends Contract

      the type of the contract this method is a part of

    Index

    Properties

    Which on complete action(s) are allowed when invoking this method.

    'NoOp'
    
    defaultArguments?: Record<string, DefaultArgument<TContract>>

    Specify default arguments that can be populated by clients calling this method.

    A map of parameter names to the default argument source

    name?: string

    Override the name used to generate the abi method selector

    onCreate?: CreateOptions

    Whether this method should be callable when creating the application.

    'disallow'
    
    readonly?: boolean

    Does the method only perform read operations (no mutation of chain state)

    false
    
    resourceEncoding?: ResourceEncodingOptions

    The resource encoding to use for this method. The default is 'value'

    index: Application, Asset, and Account arguments are included in the transaction's relevant array. The argument value is the uint8 index of the resource in the that array. value: Application, Asset and Account arguments are passed by their uint64 id (Application and Asset) or bytes[32] address (Account).

    The resource must still be 'available' to this transaction but can take advantage of resource sharing within the transaction group.

    validateEncoding?: ValidateEncodingOptions

    Controls validation behaviour for this method.

    If "args", then ABI arguments are validated automatically to ensure they are encoded correctly. If "unsafe-disabled", then no automatic validation occurs. Arguments can instead be validated using the validateEncoding(...) function. The default behaviour of this option can be controlled with the --validate-abi-args CLI flag.