TWI790450B - Smart contract on-chain method and system - Google Patents
Smart contract on-chain method and system Download PDFInfo
- Publication number
- TWI790450B TWI790450B TW109120064A TW109120064A TWI790450B TW I790450 B TWI790450 B TW I790450B TW 109120064 A TW109120064 A TW 109120064A TW 109120064 A TW109120064 A TW 109120064A TW I790450 B TWI790450 B TW I790450B
- Authority
- TW
- Taiwan
- Prior art keywords
- smart contract
- server
- parameter set
- blockchain
- signature
- Prior art date
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Conveying And Assembling Of Building Elements In Situ (AREA)
Abstract
一種智能合約上鏈方法,由一伺服器執行,包含以下步驟:(A) 在接收到一來自一客戶端的上鏈資料後,該上鏈資料包括一區塊鏈位址、一智能合約、一目標區塊鏈類型,及一對應該智能合約的智能合約參數組,根據該目標區塊鏈類型將該智能合約參數組進行轉換,以產生一轉換參數組;(B)將該轉換參數組傳送至一離線簽名機,以致該離線簽名機根據該轉換參數組產生一簽名參數組後回傳該簽名參數組至該伺服器;及(C)根據該目標區塊鏈類型,將該區塊鏈位址、該智能合約,及該簽名參數組傳送至該區塊鏈系統。此外,本發明還提供一種智能合約上鏈系統。A method for chaining a smart contract, executed by a server, comprising the following steps: (A) After receiving a chain-up data from a client, the chain-up data includes a block chain address, a smart contract, a The target block chain type, and a smart contract parameter set corresponding to the smart contract, convert the smart contract parameter set according to the target block chain type to generate a conversion parameter set; (B) transmit the conversion parameter set to an offline signature machine, so that the offline signature machine generates a signature parameter set according to the conversion parameter set and returns the signature parameter set to the server; and (C) according to the target block chain type, the block chain The address, the smart contract, and the signature parameter set are sent to the blockchain system. In addition, the present invention also provides a smart contract chaining system.
Description
本發明是有關於一種上鏈方法,特別是指一種智能合約上鏈方法及其系統。The present invention relates to a chaining method, in particular to a smart contract chaining method and its system.
區塊鏈(Blockchain)技術是一種不依賴第三方、通過自身分散式節點進行網路數據的存儲、驗證、傳遞和交流的一種分散式管理的技術。每一個區塊包含了前一個區塊的加密雜湊、相應時間戳記以及交易資料,這樣的設計使得區塊內容具有難以篡改的特性。用區塊鏈技術所串接的分散式帳本能讓兩方有效紀錄交易,且可永久查驗此交易。Blockchain (Blockchain) technology is a decentralized management technology that does not rely on third parties and stores, verifies, transmits and communicates network data through its own distributed nodes. Each block contains the encrypted hash of the previous block, the corresponding time stamp and transaction data. This design makes the content of the block difficult to tamper with. The distributed ledger connected by blockchain technology allows two parties to effectively record the transaction and permanently verify the transaction.
區塊鏈自動執行合約條款的電腦程式稱作智能合約(Smart contract)。智能合約的運作方式為只要參與方彼此達成協定,即可將資產與合約內容編碼放入區塊鏈的區塊中(即上鏈),在區塊鏈平台中的節點之間多次複製與傳遞,這些交易可追蹤且不可逆轉。A computer program that automatically executes the terms of a contract on the blockchain is called a smart contract. The operation mode of the smart contract is that as long as the participants reach an agreement with each other, the assets and contract content codes can be put into the blocks of the blockchain (that is, on the chain), and the nodes in the blockchain platform are copied and shared multiple times. Transmitted, these transactions are traceable and irreversible.
然而,不同的商業合作偏好不同的區塊鏈類型,而不同的區塊鏈有不同的操作方式,需要針對不同區塊鏈的類型的智能合約開發不同的上鏈方式,使得開發成本過高。However, different business cooperations prefer different types of blockchains, and different blockchains have different operation methods. It is necessary to develop different chaining methods for smart contracts of different types of blockchains, which makes the development cost too high.
因此,本發明的目的,即在提供一種能節省開發成本的智能合約上鏈方法。Therefore, the purpose of the present invention is to provide a smart contract chaining method that can save development costs.
於是,本發明智能合約上鏈方法,由一伺服器執行,該伺服器電連接一離線簽名機及一區塊鏈系統,且經由一通訊網路連接一客戶端,該區塊鏈上鏈方法包含一步驟(A)、一步驟(B) ,及一步驟(C)。Therefore, the smart contract chaining method of the present invention is executed by a server, the server is electrically connected to an offline signature machine and a block chain system, and is connected to a client through a communication network, and the block chain chaining method includes A step (A), a step (B), and a step (C).
在該步驟(A)中,在接收到一來自該客戶端的上鏈資料後,該上鏈資料包括一區塊鏈位址、一智能合約、一目標區塊鏈類型,及一對應該智能合約的智能合約參數組,該伺服器根據該目標區塊鏈類型將該智能合約參數組進行轉換,以產生一轉換參數組。In this step (A), after receiving an uplink data from the client, the uplink data includes a blockchain address, a smart contract, a target blockchain type, and a corresponding smart contract A smart contract parameter set, the server converts the smart contract parameter set according to the target blockchain type to generate a conversion parameter set.
在該步驟(B)中,該伺服器將該轉換參數組傳送至該離線簽名機,以致該離線簽名機根據該轉換參數組產生一簽名參數組後回傳該簽名參數組至該伺服器。In the step (B), the server sends the conversion parameter set to the offline signature machine, so that the offline signature machine generates a signature parameter set according to the conversion parameter set and returns the signature parameter set to the server.
在該步驟(C)中,該伺服器根據該目標區塊鏈類型,將該區塊鏈位址、該智能合約,及該簽名參數組傳送至該區塊鏈系統。In the step (C), the server sends the blockchain address, the smart contract, and the signature parameter set to the blockchain system according to the target blockchain type.
本發明的另一目的,即在提供一種能節省開發成本的智能合約上鏈系統。Another purpose of the present invention is to provide a smart contract on-chain system that can save development costs.
於是,本發明智能合約上鏈系統包含一離線簽名機、一區塊鏈系統、一客戶端,及一伺服器。Therefore, the smart contract on-chain system of the present invention includes an offline signature machine, a blockchain system, a client, and a server.
該客戶端連接一通訊網路,用以產生一上鏈資料,該上鏈資料包括一區塊鏈位址、一智能合約、一目標區塊鏈類型,及一對應該智能合約的智能合約參數組。The client is connected to a communication network to generate an uplink data, the uplink data includes a blockchain address, a smart contract, a target blockchain type, and a smart contract parameter set corresponding to the smart contract .
該伺服器經由該通訊網路連接該客戶端,並電連接該離線簽名機與該區塊鏈系統。The server is connected to the client through the communication network, and is electrically connected to the offline signature machine and the block chain system.
其中,該客戶端經由該通訊網路將該上鏈資料傳送至該伺服器,該伺服器根據該上鏈資料的該目標區塊鏈類型將該智能合約參數組進行轉換,以產生一轉換參數組,並將該轉換參數組傳送至該離線簽名機,該離線簽名機根據該轉換參數組產生一簽名參數組後回傳該簽名參數組至該伺服器,該伺服器根據該目標區塊鏈類型,將該區塊鏈位址、該智能合約,及該簽名參數組傳送至該區塊鏈系統。Wherein, the client transmits the uplink data to the server through the communication network, and the server converts the smart contract parameter set according to the target blockchain type of the uplink data to generate a conversion parameter set , and send the conversion parameter set to the offline signature machine, the offline signature machine generates a signature parameter set according to the conversion parameter set and returns the signature parameter set to the server, and the server according to the target blockchain type , and transmit the blockchain address, the smart contract, and the signature parameter group to the blockchain system.
本發明的功效在於:藉由該伺服器根據該目標區塊鏈類型將該智能合約參數組進行轉換,並根據該目標區塊鏈類型,將該區塊鏈位址、該智能合約,及該簽名參數組傳送至該區塊鏈系統,以進行上鏈,不需要針對不同區塊鏈的類型的智能合約開發不同的上鏈方式,達到節省開發成本之功效。The effect of the present invention is: the server converts the smart contract parameter set according to the target blockchain type, and according to the target blockchain type, the blockchain address, the smart contract, and the The signature parameter group is sent to the blockchain system for uploading to the chain. There is no need to develop different chaining methods for smart contracts of different blockchain types, which saves development costs.
在本發明被詳細描述之前,應當注意在以下的說明內容中,類似的元件是以相同的編號來表示。Before the present invention is described in detail, it should be noted that in the following description, similar elements are denoted by the same numerals.
參閱圖1,說明本發明智能合約上鏈系統的一實施例,包含一伺服器11、一離線簽名機12、一區塊鏈系統13,及一客戶端14。該伺服器11儲存多個分別對應多種區塊鏈類型的應用程式介面(Application Programming Interface, API),且該伺服器11電連接一離線簽名機12及一區塊鏈系統13,且經由一通訊網路100連接一客戶端14。值得注意的是,在本實施例中,主要以基於乙太坊虛擬機(Ethereum Virtual Machine, EVM)的區塊鏈為主,該等區塊鏈類型例如包括Quorum類型、Besu類型,該客戶端14例如為智慧型電子裝置或電腦,該離線簽名機12例如為Vault簽名機,但不以此為限。Referring to FIG. 1 , an embodiment of the smart contract on-chain system of the present invention is illustrated, including a
參閱圖1、2,以下將說明本發明智能合約上鏈方法的一實施例所包含之步驟。Referring to Figures 1 and 2, the steps included in an embodiment of the smart contract chaining method of the present invention will be described below.
在步驟201中,該客戶端14經由該通訊網路100傳送一上鏈資料至該伺服器11,其中該上鏈資料包括一區塊鏈位址、一智能合約、一目標區塊鏈類型,及一對應該智能合約的智能合約參數組。值得注意的是,在本實施例中,該目標區塊鏈類型係由該客戶端14的一使用者指定,且該智能合約參數組係由該使用者根據該智能合約所提供,該通訊網路100例如為網際網路(Internet),但不以此為限。In
在步驟202中,該伺服器11根據該目標區塊鏈類型將該智能合約參數組進行轉換,以產生一轉換參數組。要特別注意的是,該轉換參數組為二進制碼。In
在步驟203中,該伺服器11將該轉換參數組傳送至該離線簽名機12。In
在步驟204中,該離線簽名機12根據該轉換參數組產生一簽名參數組,並回傳該簽名參數組至該伺服器11。值得注意的是,在本實施例中,該離線簽名機12會生成一私鑰,並以該私鑰加密該轉換參數組以產生該簽名參數組,但不以此為限。In
在步驟205中,該伺服器11根據該目標區塊鏈類型,從該等中應用程式介面獲得至少一對應該目標區塊鏈類型的目標應用程式介面。要特別說明的是,在本實施例中,Quorum類型對應的目標應用程式介面例如為eth_sendRawTransaction及eth_sendRawPrivateTransaction,Besu類型對應的目標應用程式介面例如為eea_sendRawTransaction,但不以此為限。In
在步驟206中,該伺服器11利用該至少一目標應用程式介面將該區塊鏈位址、該智能合約,及該簽名參數組傳送至該區塊鏈系統13。In
在步驟207中,該區塊鏈系統13根據該區塊鏈位址儲存該智能合約及該簽名參數組,且產生並傳送一上鏈結果至該伺服器11。In
在步驟208中,該伺服器11經由該通訊網路100傳送該上鏈結果至該客戶端14。In
在步驟209中,該客戶端14經由該通訊網路100接收該上鏈結果。In
綜上所述,本發明智能合約上鏈方法及其系統,藉由該伺服器11根據該目標區塊鏈類型將該智能合約參數組進行轉換,並根據該目標區塊鏈類型,獲得該至少一目標應用程式介面,再利用該至少一目標應用程式介面將該區塊鏈位址、該智能合約,及該簽名參數組傳送至該區塊鏈系統13,以進行上鏈,不需要針對不同區塊鏈的類型的智能合約開發不同的上鏈方式,達到節省開發成本之功效,故確實能達成本發明的目的。To sum up, the smart contract chaining method and system of the present invention uses the
惟以上所述者,僅為本發明的實施例而已,當不能以此限定本發明實施的範圍,凡是依本發明申請專利範圍及專利說明書內容所作的簡單的等效變化與修飾,皆仍屬本發明專利涵蓋的範圍內。But the above-mentioned ones are only embodiments of the present invention, and should not limit the scope of the present invention. All simple equivalent changes and modifications made according to the patent scope of the present invention and the content of the patent specification are still within the scope of the present invention. Within the scope covered by the patent of the present invention.
11:伺服器
12:離線簽名機
13:區塊鏈系統
14:客戶端
100:通訊網路
201~209:步驟11:Server
12: Offline signature machine
13: Blockchain system
14: client
100:
本發明的其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中: 圖1是一方塊圖,說明本發明智能合約上鏈系統的一實施例;及 圖2是一流程圖,說明本發明智能合約上鏈方法的一實施例。Other features and effects of the present invention will be clearly presented in the implementation manner with reference to the drawings, wherein: Fig. 1 is a block diagram illustrating an embodiment of the smart contract on-chain system of the present invention; and Fig. 2 is a flowchart illustrating an embodiment of the smart contract chaining method of the present invention.
11:伺服器11:Server
12:離線簽名機12: Offline signature machine
13:區塊鏈系統13: Blockchain system
14:客戶端14: client
100:通訊網路100: Communication network
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109120064A TWI790450B (en) | 2020-06-15 | 2020-06-15 | Smart contract on-chain method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109120064A TWI790450B (en) | 2020-06-15 | 2020-06-15 | Smart contract on-chain method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202201306A TW202201306A (en) | 2022-01-01 |
TWI790450B true TWI790450B (en) | 2023-01-21 |
Family
ID=80787966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109120064A TWI790450B (en) | 2020-06-15 | 2020-06-15 | Smart contract on-chain method and system |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI790450B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201828210A (en) * | 2017-01-26 | 2018-08-01 | 富邦金融控股股份有限公司 | System for insuring based on smart contracts and method thereof |
TW201928755A (en) * | 2017-12-13 | 2019-07-16 | 安地卡及巴布達商區塊鏈控股有限公司 | System and method for securely sharing cryptographic material |
US20200184556A1 (en) * | 2018-05-06 | 2020-06-11 | Strong Force TX Portfolio 2018, LLC | Adaptive intelligence and shared infrastructure lending transaction enablement platform responsive to crowd sourced information |
-
2020
- 2020-06-15 TW TW109120064A patent/TWI790450B/en active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201828210A (en) * | 2017-01-26 | 2018-08-01 | 富邦金融控股股份有限公司 | System for insuring based on smart contracts and method thereof |
TW201928755A (en) * | 2017-12-13 | 2019-07-16 | 安地卡及巴布達商區塊鏈控股有限公司 | System and method for securely sharing cryptographic material |
US20200184556A1 (en) * | 2018-05-06 | 2020-06-11 | Strong Force TX Portfolio 2018, LLC | Adaptive intelligence and shared infrastructure lending transaction enablement platform responsive to crowd sourced information |
Non-Patent Citations (1)
Title |
---|
網路文獻 翁杰 區塊鏈技術於電子簽章之相容性研究 國立政治大學法律科際整合研究所碩士學位論文 108年7月 * |
Also Published As
Publication number | Publication date |
---|---|
TW202201306A (en) | 2022-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112214780B (en) | Data processing method and device, intelligent equipment and storage medium | |
US10878248B2 (en) | Media authentication using distributed ledger | |
CN111144881B (en) | Selective access to asset transfer data | |
KR101727525B1 (en) | Block chain based distributed storage method and device thereof | |
US20220318907A1 (en) | Systems and methods for generating secure, encrypted communications across distributed computer networks for authorizing use of cryptography-based digital repositories in order to perform blockchain operations in decentralized applications | |
CN112055025B (en) | Privacy data protection method based on block chain | |
CN109889497B (en) | Distrust-removing data integrity verification method | |
TWI744532B (en) | Methods and systems to establish trusted peer-to-peer communications between nodes in a blockchain network | |
CN110599095B (en) | Block chain network-based hazardous waste treatment method and node of block chain network | |
US10819505B2 (en) | System and method for information protection | |
CN110569674A (en) | Block chain network-based authentication method and device | |
CN112804354B (en) | Method and device for data transmission across chains, computer equipment and storage medium | |
CA3037833A1 (en) | System and method for information protection | |
CN111209262A (en) | Large-scale distributed safe storage system based on block chain | |
CN113255014B (en) | Data processing method based on block chain and related equipment | |
CN114567643B (en) | Cross-blockchain data transfer method, device and related equipment | |
JP2022500920A (en) | Systems and methods for sharing common secrets implemented by computers | |
CN111292057A (en) | Service processing method based on block chain | |
CN113904854B (en) | Block chain data encryption method and device based on quotient algorithm | |
CN109918867B (en) | Peer-to-peer system file tracing method based on block chain | |
CN110827034B (en) | Method and apparatus for initiating a blockchain transaction | |
TWI790450B (en) | Smart contract on-chain method and system | |
CN110166460B (en) | Service account registration method and device, storage medium and electronic device | |
US20230246822A1 (en) | Systems and methods for providing secure, encrypted communications across distributed computer networks by coordinating cryptography-based digital repositories in order to perform blockchain operations in decentralized applications | |
TWM601391U (en) | Smart contract on-chain system |