decode From Message
Extracts and decodes the first known contract error code from an error message.
Soroban RPC surfaces contract failures as Error(Contract, #NNNN) inside simulation and submission error strings (typically the message of a thrown TransactionException). This scans the message for such markers and returns the first one whose code is a known OZ smart-account contract error, or null when the message is null, carries no marker, or carries only unknown codes.