MT#3949 API: move common contract stuff to role.