Innovative edge devices (e.g., smartphones, IoT devices) are becoming much more pervasive in our daily lives. With powerful sensing and computing capabilities, users can generate massive amounts of data. A new business model has emerged where data producers can sell their data to consumers directly to make money. However, how to protect the profit of the data producer from rogue consumers that may resell without authorization remains challenging. In this paper, we propose a smart-contract based protocol to protect the profit of the data producer while allowing consumers to resell the data legitimately. The protocol ensures the revenue is shared with the data producer over authorized reselling, and detects any unauthorized reselling. We also introduce a data relay process that can enhance data accessibility in wireless edge networks. We formulate a revenue sharing problem to maximize the profit of both the data producer and resellers/relayers. We formulate the problem into a two-stage Stackelberg game and determine a ratio to share the reselling revenue between the data producer and resellers/relayers. Extensive simulations show that with resellers and relayers, our mechanism can achieve up to 49.5 percent higher profit for the data producer and resellers/relayers.