validate_signer

function validate_signer(signer: byte_array)(source)

Checks if the signer has the correct size

Throws "UNSUPPORTED SIGNER" if the signer's size does not match either:

  • EVM_ADDRESS_SIZE length of 20 bytes

  • FT_PUBKEY_SIZE length of 33 bytes

Should be used to validate the signer's size of an evm address or an ft pubkey

Example: validate_signer(x"") will throw this error: UNSUPPORTED SIGNER: Unsupported signer x""