Transaction costs are a barrier to the wide adoption of decentralized applications. To address this issue, this paper proposes a framework to optimize transaction fees by carrying out a conflict-avoiding packaging of multiple smart-contract calls into a single transaction. It relies on two main concepts: a way to optimize the bundling of transactions with a conflict-avoiding packaging strategy and a way to execute such bundles with a package-processing methodology. We illustrate our framework and the gas economy it can bring with a case study where we analyze a popular Ethereum smart contract.