warehouse: refactor contract interface

Change-Id: I9fd19de626f33eee47c2bad33433999051b9ce1a