A method and apparatus for digital asset transfer between blockchains

By configuring cross-chain bridges and deploying smart contracts on the blockchain, the problem of digital asset transfer between different blockchain networks is solved, enabling efficient transfer and interoperability of digital assets between different blockchains.

CN117011042BActive Publication Date: 2026-11-20HANGZHOU RIVTOWER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310735020.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2026-11-20
Estimated Expiration
2043-06-20

AI Technical Summary

Technical Problem

Digital assets cannot be freely moved and exchanged between different blockchain networks, and the lack of cross-chain technology support results in insufficient interoperability and scalability.

Method used

By configuring cross-chain bridges on the blockchain and deploying cross-chain contracts, asset contracts, and hash time lock contracts, digital assets can be transferred between different blockchains, and cross-chain operations can be performed using smart contracts.

Benefits of technology

It enhances the operability of digital assets across different blockchains, improves interoperability and scalability, and enables the transfer of digital assets under a cross-chain bridge locking + minting/burning mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011042B_ABST
    Figure CN117011042B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a kind of between block chain digital asset transfer method and device, in block chain configuration cross-chain bridge, to make different block chain between through corresponding connection cross-chain bridge realizes the transfer of digital assets;It is suitable for cross-chain bridge, the method comprises: receiving and sending digital asset transfer request, the digital asset transfer request at least includes asset metadata and target account address;In response to the digital asset transfer request, deploy the smart contract for executing digital asset transfer;The smart contract at least includes cross-chain contract, the cross-chain contract can be mutually called with the cross-chain contract of external cross-chain bridge;Call the smart contract, execute digital asset transfer operation.The present application scheme is based on cross-chain bridge and smart contract, through interconnected block chain cross-chain bridge and in cross-chain bridge deploy cross-chain contract, asset contract and hash time lock contract, realize asset between different block chain transfer, enhanced the operability of asset transfer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of blockchain technology, and in particular to a method, apparatus, and corresponding electronic devices and storage media for transferring digital assets between blockchains. Background Technology

[0002] With the development of blockchain technology, an increasing number of digital assets are being created and stored on different blockchain networks. These digital assets may include digital securities, digital artwork, and more. Because each blockchain network has its own unique rules and protocols, digital assets cannot move freely between different blockchains. This necessitates cross-chain technology to enable the transfer and exchange of digital assets between different blockchains. Cross-chain bridge technology allows digital assets to be traded across different blockchains, thereby increasing their liquidity and value. Cross-chain bridges primarily employ three technical solutions: locking + minting / burning, liquidity pooling, and atomic swapping. Furthermore, combining smart contract technology can further expand digital asset transfer solutions based on cross-chain bridge technology. Different blockchain networks can interoperate through cross-chain technology, enabling more complex application scenarios and functions. Cross-chain technology also makes blockchain networks easier to scale, meeting the needs and application scenarios of different users and effectively improving the interoperability and scalability of blockchain networks. Summary of the Invention

[0003] The purpose of the embodiments in this specification is to address the above-mentioned problems by providing a method, apparatus, and corresponding electronic devices and storage media for transferring digital assets between blockchains.

[0004] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows: Firstly, a method for transferring digital assets between blockchains is proposed. This method involves configuring cross-chain bridges within the blockchains to enable the transfer of digital assets between different blockchains through corresponding cross-chain bridge connections. Applicable to cross-chain bridges, the method includes: Receive and send a digital asset transfer request, the digital asset transfer request including at least asset metadata and target account address; In response to the digital asset transfer request, a smart contract for executing the digital asset transfer is deployed; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The smart contract is invoked to execute the digital asset transfer operation.

[0005] Furthermore, the digital asset attributes of the cross-chain contract include at least the asset metadata and the target account address corresponding to the digital asset transfer request.

[0006] Furthermore, the smart contract also includes an asset contract, which can work with the cross-chain contract to mint corresponding digital assets.

[0007] Furthermore, the smart contract also includes a hash time lock contract, which can work with the cross-chain contract and the asset contract to lock and / or unlock the corresponding digital assets.

[0008] Furthermore, the cross-chain contract includes a transfer processing transaction function; when a user initiates a transfer proposal for the first digital asset, the source cross-chain bridge calls the transfer processing transaction function of the cross-chain contract, including: Transfer ownership of the first digital asset to the cross-chain contract; Invoke the hash time lock contract to lock the first digital asset and transfer it to the asset contract; The target cross-chain bridge's asset contract is invoked to mint a second digital asset identical to the asset metadata of the first digital asset, and the target cross-chain bridge's hash time lock contract is invoked to lock the second digital asset.

[0009] Furthermore, the cross-chain contract also includes a transfer confirmation transaction function; after the locking of the first digital asset and the second digital asset is completed, the source cross-chain bridge calls the transfer confirmation transaction function of the cross-chain contract, including: Unlock and destroy the first digital asset; Invoke the cross-chain contract of the target cross-chain bridge to unlock the second digital asset and transfer the second digital asset to the target account address.

[0010] Furthermore, the cross-chain contract also includes a transfer cancellation transaction function; calling the transfer cancellation transaction function instructs the hash time lock contract to cancel the locking operation on the digital asset.

[0011] Furthermore, the asset contract includes one or more standard contracts among ERC-20, ERC-721, and ERC-1155.

[0012] Furthermore, the hash time lock contract includes at least one transaction function among asset locking, asset unlocking, and lock revocation.

[0013] Secondly, a blockchain digital asset transfer device is proposed, which configures cross-chain bridges in the blockchain to enable the transfer of digital assets between different blockchains through corresponding cross-chain bridge connections; applicable to cross-chain bridges, the device includes: The first module is capable of receiving and sending digital asset transfer requests, wherein the digital asset transfer requests include at least asset metadata and the target account address; The second module is capable of responding to the digital asset transfer request by deploying a smart contract for executing the digital asset transfer; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The third module can call the smart contract to perform digital asset transfer operations.

[0014] Furthermore, the smart contract also includes: an asset contract, which can work with the cross-chain contract to mint corresponding digital assets; and / or a hash time lock contract, which can work with the cross-chain contract and the asset contract to lock and / or unlock corresponding digital assets.

[0015] Thirdly, an electronic device is proposed, comprising: a processor; and A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method described in the first aspect.

[0016] Fourthly, a computer-readable storage medium is provided that stores one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the method described in the first aspect.

[0017] This manual can achieve at least the following technical effects: This invention is based on cross-chain bridge and smart contract technology. By deploying corresponding cross-chain bridges on the blockchain and establishing connections between them, and by deploying cross-chain contracts, asset contracts and hash time lock contracts in the cross-chain bridges, it is possible to transfer digital assets between different blockchains, effectively enhancing the operability of digital asset transfer based on the cross-chain bridge locking + minting / destruction mechanism. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram illustrating a connection method for a digital asset transfer scheme between blockchains, provided as an embodiment of this specification.

[0020] Figure 2 This is one of the schematic diagrams of a method for transferring digital assets between blockchains, provided as an embodiment of this specification.

[0021] Figure 3 This is the second schematic diagram of a method for transferring digital assets between blockchains, provided as an embodiment of this specification.

[0022] Figure 4 This is the third schematic diagram of a method for transferring digital assets between blockchains, provided as an embodiment of this specification.

[0023] Figure 5 This is a schematic diagram of a digital asset transfer device between blockchains, provided as an embodiment of this specification.

[0024] Figure 6 This is a schematic diagram of the structure of an electronic device provided as an embodiment of this specification. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0026] The following section provides a detailed example of a digital asset transfer scheme between blockchains covered in this specification.

[0027] Key terms Blockchain digital assets refer to various assets existing in digital form on a blockchain, including digital securities and digital commodities. These digital assets can be issued, traded, transferred, and stored through blockchain technology, and have higher liquidity, transparency, and traceability compared to traditional assets.

[0028] Cross-chain refers to the process of connecting and communicating between different blockchains. In the blockchain world, each blockchain is independent, with its own nodes and ledgers, and cannot directly communicate or exchange information with each other. Cross-chain technology enables the circulation and interaction of digital assets, smart contracts, and other information across different blockchains, achieving interoperability between them.

[0029] Cross-chain bridge technology is a technology that connects different blockchain networks, enabling the transfer and exchange of assets between them. Cross-chain bridges achieve interoperability between different blockchains, allowing users to use homogeneous digital assets across different blockchain networks. The main operating mechanisms of cross-chain bridge technology include: atomic substitution mechanisms, locking + minting / burning mechanisms, and liquidity substitution mechanisms. Locking + Minting / Destroying Mechanism: This means that the cross-chain bridge locks the user's assets on the source chain and mints / destroys an equal amount of credential assets on the target chain and transfers them to the user's account on the target chain, thereby completing the cross-chain transfer of asset value. This mechanism does not require liquidity.

[0030] A Hashed TimeLock Contract is a smart contract used to mitigate counterparty risk in blockchain applications. It achieves this through a time-based escrow mechanism that requires cryptographic verification of transaction completion. In this contract, both parties must lock their assets and enter the correct hash value within a specified time to complete the transaction. If the transaction is not completed within the specified time, the assets are released to their original owner.

[0031] The purpose of this invention is to propose a solution for cross-chain transfer of digital assets, addressing the technical problem of transferring digital assets issued on different blockchains. The solution implemented in this invention employs a cross-chain bridge technology based on smart contracts. It is built upon a locking + minting / destruction mechanism, utilizing cross-chain contracts, asset contracts, and hash time-lock contracts to achieve the cross-chain bridge solution. The basic idea is to authorize digital assets to a cross-chain contract, which then calls the hash time-lock contract to lock the digital assets and transfer them to the asset contract. After this operation, the cross-chain contract of the source blockchain calls the cross-chain contract of the target blockchain to mint digital assets of equivalent value and transfer them to the asset contract of the target blockchain. Simultaneously, it calls the hash time-lock contract of the target blockchain to lock the minted assets. When all the above steps are successfully completed, the cross-chain contract of the source blockchain unlocks and destroys the digital assets in the source blockchain cross-chain bridge. Simultaneously, it calls the cross-chain contract of the target blockchain to unlock the locked digital assets in the target blockchain cross-chain bridge and transfer them to a designated target account. Example 1

[0032] like Figure 1The diagram illustrates the basic connection method of a digital asset transfer scheme between blockchains according to an embodiment of the present invention. Cross-chain bridges are configured on the blockchains to enable the transfer of digital assets between different blockchains through corresponding connected cross-chain bridges. In one implementation of this embodiment, a cross-chain bridge service can be deployed on the management platform of each blockchain. The cross-chain bridges are interconnected through corresponding blockchain addresses. That is, if digital assets are to be transferred between two different blockchains, the cross-chain bridges of these two blockchains must first be interconnected. After the cross-chain bridge service is successfully registered, it will trigger the blockchain management platform to deploy the corresponding contract to execute the digital asset transfer operation.

[0033] like Figure 2 The diagram shown is a flowchart illustrating a method for transferring digital assets between blockchains according to an embodiment of the present invention. Since the main entity executing the method is actually a cross-chain bridge deployed on the blockchain, the method is applicable to cross-chain bridges and includes: S101: Receive and send a digital asset transfer request, the digital asset transfer request including at least asset metadata and target account address.

[0034] It should be noted that once the cross-chain bridge service is deployed, the deployment of the corresponding smart contract is triggered when the cross-chain bridge receives a user's digital asset transfer request.

[0035] Specifically, the digital asset transfer request includes at least the basic information of the digital asset and the account address information to which it is to be transferred. Since the digital asset to be transferred in this invention is first authorized to a cross-chain contract running on the cross-chain bridge service, meaning the cross-chain contract temporarily holds the digital asset, the basic information of the digital asset should also be received by the cross-chain contract accordingly. For the digital asset minting operation involved in this embodiment, the metadata of the digital asset is essential basic information so that an equivalent value of digital asset can be minted in the target blockchain cross-chain bridge based on the metadata of the digital asset.

[0036] S102: In response to the digital asset transfer request, deploy a smart contract for performing the digital asset transfer; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges.

[0037] Specifically, the cross-chain contract is a smart contract used to process the transfer of digital assets. The cross-chain contract includes a data attribute section and corresponding transaction functions. As mentioned earlier, the data attribute section of the cross-chain contract should include the basic information of the digital assets and the account information to be transferred from the digital asset transfer request.

[0038] In some embodiments of the present invention, the cross-chain contract includes a transfer processing transaction function; when a user initiates a transfer proposal for a first digital asset, the source cross-chain bridge calls the transfer processing transaction function of the cross-chain contract, such as... Figure 3 As shown, it includes: S311: Transfer ownership of the first digital asset to the cross-chain contract; S312: Invoke the hash time lock contract to lock the first digital asset and transfer it to the asset contract; S313: Invoke the asset contract of the target cross-chain bridge to mint a second digital asset with the same asset metadata as the first digital asset, and invoke the hash time lock contract of the target cross-chain bridge to lock the second digital asset.

[0039] In some embodiments of the present invention, the cross-chain contract further includes a transfer confirmation transaction function; after the locking of the first digital asset and the second digital asset is completed, the source cross-chain bridge calls the transfer confirmation transaction function of the cross-chain contract, such as... Figure 4 As shown, it includes: S411: Unlock and destroy the first digital asset; S412: Invoke the cross-chain contract of the target cross-chain bridge to unlock the second digital asset and transfer the second digital asset to the target account address.

[0040] In some embodiments of the present invention, the cross-chain contract further includes a transfer cancellation transaction function; invoking the transfer cancellation transaction function instructs the hash time lock contract to cancel the locking operation on the digital asset. Specifically, in one embodiment, the data attributes of the cross-chain contract are defined as follows: tokenId: The identifier of the digital asset to be transferred; tokenURI: The URL of the digital asset to be transferred; tokenMetadata: Metadata of the digital assets to be transferred; tokenOwner: The holder of the digital assets to be transferred; tokenReceiver: The account address to which the token is to be transferred to the blockchain; thatChainPath: The blockchain address to be transferred.

[0041] Furthermore, the transaction function of the cross-chain contract is defined as follows: transferPropose: Transfer transaction function; transferConfirm: The function for confirming the transfer transaction. transferCancel: A function to cancel a transaction transfer.

[0042] In some embodiments of the present invention, the smart contract further includes an asset contract, which can work with the cross-chain contract to mint corresponding digital assets.

[0043] In some embodiments of the present invention, the asset contract includes one or more standard contracts selected from ERC-20, ERC-721, and ERC-1155.

[0044] In some embodiments of the present invention, the smart contract further includes a hash time lock contract, which can cooperate with the cross-chain contract and the asset contract to lock and / or unlock the corresponding digital assets.

[0045] In some embodiments of the present invention, the hash time lock contract includes at least one transaction function among asset locking, asset unlocking, and lock revocation.

[0046] Specifically, the data attributes of the hash time lock contract include: hashLockStr: The hash value to be locked; lockTime: The duration of the lock; secret: a locked random secret number; In addition, the transaction functions of the hash time lock contract include: lock: Asset locking transaction function; unlock: Unlock asset transaction function; cancel: Undoes the locking function.

[0047] S103: Invoke the smart contract to execute the digital asset transfer operation.

[0048] The specific implementation is described below. After the blockchain management platform deploys the cross-chain bridge service and completes registration, the cross-chain bridge deploys the asset contract, hash time lock contract, and cross-chain contract, and initializes the aforementioned contracts. When a user initiates a proposal request to transfer digital assets, the source chain cross-chain bridge calls the transferPropose transaction function of the cross-chain contract to authorize the digital asset to the source cross-chain bridge's cross-chain contract; the transferPropose transaction function calls the locking transaction function of the hash time lock contract to lock the digital asset and transfer it to the asset contract. After the above steps are completed, the source chain cross-chain bridge calls the transferPropose transaction function of the cross-chain contract to call the cross-chain contract deployed in the target blockchain cross-chain bridge to perform an asset minting operation, so as to mint digital assets of equivalent value in the target cross-chain bridge. At the same time, the transferPropose transaction function calls the locking transaction function of the hash time lock contract of the target cross-chain bridge to lock the digital asset and transfer it to the target cross-chain bridge's asset contract. Once the equivalent digital assets are minted on the target cross-chain bridge, the source chain cross-chain bridge calls the `transferConfirm` transaction function of the cross-chain contract to unlock and destroy the digital assets on the source cross-chain bridge. After successful completion, it calls the `transferConfirm` transaction function of the target cross-chain bridge's cross-chain contract to execute the corresponding operation, unlocking and transferring the assets to the `tokenReceiver`, i.e., the account address to be transferred to the blockchain. If an execution error or exception occurs during the digital asset transfer process, the respective blockchain cross-chain bridges call the `transferCancel` transaction function of their cross-chain contracts to instruct their respective cross-chain bridge's hash time-lock contract to cancel the locking operation on the digital assets.

[0049] This invention is based on cross-chain bridge and smart contract technology. By deploying corresponding cross-chain bridges on the blockchain and establishing connections between them, and by deploying cross-chain contracts, asset contracts and hash time lock contracts in the cross-chain bridges, it is possible to transfer digital assets between different blockchains, effectively enhancing the operability of digital asset transfer based on the cross-chain bridge locking + minting / destruction mechanism. Example 2

[0050] Figure 5 This is a schematic diagram of a digital asset transfer device 500 between blockchains, provided as an embodiment of this specification. Please refer to... Figure 5 In one embodiment, a digital asset transfer device 500 between blockchains configures cross-chain bridges on the blockchains to enable the transfer of digital assets between different blockchains through corresponding connected cross-chain bridges; suitable for cross-chain bridges, the device 500 includes: The first module 501 is capable of receiving and sending digital asset transfer requests, wherein the digital asset transfer request includes at least asset metadata and target account address; The second module 502 is capable of responding to the digital asset transfer request by deploying a smart contract for executing the digital asset transfer; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The third module 503 can call the smart contract to perform digital asset transfer operations.

[0051] It should be understood that the blockchain-to-blockchain digital asset transfer device 500 of the embodiments of this specification can also perform... Figures 1 to 4 A method for executing digital asset transfer devices (or equipment) between blockchains, and for enabling digital asset transfer devices (or equipment) between blockchains to... Figures 1 to 4 The functionality of the example shown will not be elaborated upon here. Example 3

[0052] Figure 6 This is a schematic diagram of the structure of an electronic device according to one embodiment of this specification. Please refer to it. Figure 6 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0053] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0054] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0055] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a shared resource access control mechanism at the logical level. The processor executes the program stored in memory and specifically performs the following operations: Configuring cross-chain bridges in a blockchain to enable the transfer of digital assets between different blockchains through corresponding connected cross-chain bridges; applicable to cross-chain bridges, the method includes: Receive and send a digital asset transfer request, the digital asset transfer request including at least asset metadata and target account address; In response to the digital asset transfer request, a smart contract for executing the digital asset transfer is deployed; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The smart contract is invoked to execute the digital asset transfer operation.

[0056] The above is as described in this instruction manual. Figures 1 to 4 The digital asset transfer method between blockchains disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0057] Of course, in addition to the software implementation, the electronic devices in the embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices. Example 4

[0058] This specification also provides an embodiment of a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figures 1 to 4 The illustrated embodiment provides a method for transferring digital assets between blockchains, specifically for performing the following methods: Configuring cross-chain bridges in a blockchain to enable the transfer of digital assets between different blockchains through corresponding connected cross-chain bridges; applicable to cross-chain bridges, the method includes: Receive and send a digital asset transfer request, the digital asset transfer request including at least asset metadata and target account address; In response to the digital asset transfer request, a smart contract for executing the digital asset transfer is deployed; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The smart contract is invoked to execute the digital asset transfer operation.

[0059] In summary, the above description is merely a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0060] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0061] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0062] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0063] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A method for transferring digital assets between blockchains, characterized in that, Configure cross-chain bridges in the blockchain to enable the transfer of digital assets between different blockchains through corresponding cross-chain bridge connections; Applicable to cross-chain bridges, the method includes: Receive and send a digital asset transfer request, the digital asset transfer request including at least asset metadata and target account address; In response to the digital asset transfer request, a smart contract for executing the digital asset transfer is deployed; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The smart contract is invoked to execute a digital asset transfer operation; the smart contract also includes an asset contract, which can work with the cross-chain contract to mint corresponding digital assets; the smart contract also includes a hash time lock contract, which can work with the cross-chain contract and the asset contract to lock and / or unlock corresponding digital assets. The cross-chain contract includes a transfer processing transaction function; when a user initiates a transfer proposal for the first digital asset, the source cross-chain bridge calls the transfer processing transaction function of the cross-chain contract, including: Transfer ownership of the first digital asset to the cross-chain contract; Invoke the hash time lock contract to lock the first digital asset and transfer it to the asset contract; Invoke the asset contract of the target cross-chain bridge to mint a second digital asset with the same asset metadata as the first digital asset, and invoke the hash time lock contract of the target cross-chain bridge to lock the second digital asset; The cross-chain contract also includes a transfer confirmation transaction function; after the locking of the first digital asset and the second digital asset is completed, the source cross-chain bridge calls the transfer confirmation transaction function of the cross-chain contract, including: Unlock and destroy the first digital asset; Invoke the cross-chain contract of the target cross-chain bridge to unlock the second digital asset and transfer the second digital asset to the target account address.

2. The method according to claim 1, characterized in that, The digital asset attributes of the cross-chain contract include at least the asset metadata and the target account address corresponding to the digital asset transfer request.

3. The method according to claim 1, characterized in that, The cross-chain contract also includes a transfer and cancellation transaction function; calling the transfer and cancellation transaction function instructs the hash time lock contract to cancel the locking operation on the digital asset.

4. The method according to claim 1, characterized in that, The asset contracts include one or more standard contracts among ERC-20, ERC-721, and ERC-1155.

5. The method according to claim 1, characterized in that, The hash time lock contract includes at least one transaction function among asset locking, asset unlocking, and lock revocation.

6. A blockchain digital asset transfer device, characterized in that, Configure cross-chain bridges in the blockchain to enable the transfer of digital assets between different blockchains through corresponding cross-chain bridge connections; Suitable for cross-chain bridges, the device includes: The first module is capable of receiving and sending digital asset transfer requests, wherein the digital asset transfer requests include at least asset metadata and the target account address; The second module is capable of responding to the digital asset transfer request by deploying a smart contract for executing the digital asset transfer; the smart contract includes at least a cross-chain contract, which can call each other with the cross-chain contracts of external cross-chain bridges; The third module can invoke the smart contract to execute digital asset transfer operations. The smart contract further includes: an asset contract, which can cooperate with the cross-chain contract to mint corresponding digital assets; and a hash time lock contract, which can cooperate with the cross-chain contract and the asset contract to lock and / or unlock corresponding digital assets. The cross-chain contract includes a transfer processing transaction function. When a user initiates a transfer proposal for the first digital asset, the source cross-chain bridge invokes the transfer processing transaction function of the cross-chain contract, including: transferring ownership of the first digital asset to the cross-chain contract; and invoking the hash time lock contract to perform the transfer. The process involves locking and transferring a first digital asset to the asset contract; invoking the asset contract of the target cross-chain bridge to mint a second digital asset with the same asset metadata as the first digital asset; and invoking the hash time lock contract of the target cross-chain bridge to lock the second digital asset. The cross-chain contract also includes a transfer confirmation transaction function. After locking the first and second digital assets, the source cross-chain bridge invokes the transfer confirmation transaction function of the cross-chain contract, including: unlocking and destroying the first digital asset; invoking the cross-chain contract of the target cross-chain bridge to unlock the second digital asset and transfer the second digital asset to the target account address.

7. An electronic device, characterized in that, include: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs that, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Smart contract interaction model for cross-blockchain interaction and collaborative execution system

    CN113450113A

  • Cross-chain asset interaction method based on improved hash time lock

    CN114240409A