In recent years, blockchain technology has developed rapidly and has been widely used in medical, financial, energy and other fields. However, in the process of practical application, each blockchain is a small independent ecosystem, with all transactions and operations limited to the chain, resulting in a large number of mutually heterogeneous to independent blockchains. It presents challenges for cross-chain interactions, cross-organization data sharing, and cross-blockchain expansion, and hinders the wider application of blockchain technology. In addition, the traditional digital signature method based on elliptic curve cipher faces the threat of being cracked by quantum computing attacks. To solve the aforementioned problems, this paper proposed a blockchain smart contract technique based on quantum computing attack resistance(BSCTQCAT). The technique first introduces the digital signature of the lattice cipher into the blockchain to resist the quantum search algorithm attack. Then, based on the smart contract authentication scheme, the nodes on multiple heterogeneous chains are organized into an identity agent layer P2P network, through which transactions on the chain will establish a credible identity management and message authentication mechanism between different chains, solving the current problem that each chain is difficult to communicate with each other. In this paper, the performance of the algorithm is evaluated by simulating the Bitcoin transaction scenario and analyzing the experimental data.