'How to create a simple swapping contract

I want to create a contract that buys and sells to a fixed price which can be set with a contract interaction onlyOwner basically i need a token vendor with editable price



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source