isTxContext function

bool isTxContext(
  1. dynamic param
)

Implementation

bool isTxContext(dynamic param) {
	final struct = param?["body"] is Map ? param["body"]["datatype"] : null;

	return (
		struct != null &&
		normalizeSuiAddress(struct["package"]) == normalizeSuiAddress('0x2') &&
		struct["module"] == 'tx_context' &&
		struct["type"] == 'TxContext'
	);
}