Algorand TypeScript
    Preparing search index...

    Function methodSelector

    • Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first 4 bytes of the SHA512/256 hash of the method signature.

      Parameters

      • methodSignature: InstanceMethod<Contract>

        An ARC4 contract method reference. (Eg. MyContract.prototype.myMethod)

      Returns bytes

      The ARC4 method selector. Eg. 02BECE11

    • Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first 4 bytes of the SHA512/256 hash of the method signature.

      Parameters

      • methodSignature: string

        An ARC4 method signature string (Eg. hello(string)string. Must be a compile time constant)

      Returns bytes

      The ARC4 method selector. Eg. 02BECE11