The use of smart contract technology for contract execution and real-time payment can ensure the timely availability of funds, thus ensuring the security and authenticity of data in power grid transactions. In this paper, we design a digital RMB smart contract model based on blockchain technology and use the hexadecimal model to create, deploy, and execute smart contract functions. And through the DTSC algorithm, smart contracts can be applied to the grid smart payment settlement. At the same time, a privacy protection algorithm for transaction data is proposed, and finally, the grid smart payment settlement system is designed based on smart contracts and privacy protection algorithms. Simulation test results show that the cost required for the digital RMB smart contract proposed in this paper is lower than the existing schemes in terms of invocation and deployment costs. The average chain code invocation delay in smart contract technology decreases when the transaction sending rate increases from 250TPS to 300TPS. Moreover, the on-chain operation time of this system is only 2.69 seconds, which meets the demand of practical power grid smart payment settlement applications. This paper sets the foundation for the efficient operation of the grid smart payment and settlement system and provides a guarantee for payment and settlement security.