createchaintradetx complete implementtation