NULLDATA transaction example
This transaction uses NULLDATA outputs (with OP_RETURN) to create provably unspendable outputs on the blockchain. These outputs are allowed to contain up to 80 bytes of custom data. The coins are sent back to (a new) P2WPKH address.
Fee rate is (inaccurately) approximated. To set exact fee rate sign the transaction, calculate fee based on its virtual size and then sign again - changing the value of the output invalidates previous signatures.
This code was used to produce testnet transaction: https://mempool.space/testnet/tx/11cca738065ca9172394f800bab3f997698851fd0245848ec491b2744d1807e8