CN112967011A - Contract automatic deployment method and system - Google Patents
Contract automatic deployment method and system Download PDFInfo
- Publication number
- CN112967011A CN112967011A CN202110188883.3A CN202110188883A CN112967011A CN 112967011 A CN112967011 A CN 112967011A CN 202110188883 A CN202110188883 A CN 202110188883A CN 112967011 A CN112967011 A CN 112967011A
- Authority
- CN
- China
- Prior art keywords
- contract
- code
- deployment
- parameter variables
- compiling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Abstract
The invention discloses a contract automatic deployment method and a system, which comprises the steps of obtaining a predefined contract template file, and marking contract code parameter variables in the contract template file; selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code; and finally, compiling and packaging the deployment codes into transactions and submitting the transactions to a blockchain network, thereby overcoming the defect that in the traditional contract deployment, the procedures of compiling the codes and compiling by professionals and finally packaging the transactions until the blockchain intelligent contract signing is completed are complicated and inconvenient. Through the scheme, the execution efficiency of the intelligent contract is improved, and the reliability of the application information and the irrevocability of contract terms are guaranteed.
Description
Technical Field
The invention belongs to the technical field of block chain contract deployment, and particularly relates to a contract automatic deployment method and system.
Background
A Smart Contract, is a computer protocol that aims to propagate, verify, or execute contracts in an informational manner.
The intelligent contract in the block chain field has the following characteristics:
rules are transparent to disclosure, rules within contracts and data are visible to the outside.
All transactions are publicly visible and there are no false or hidden transactions.
The intelligent block chain contract needs professionals to compile codes, compile and package transactions finally, and then the intelligent block chain contract is submitted to a block chain network to be deployed successfully, and common users or enterprises lack technical capability when needing corresponding block chain functions and cannot realize related functional requirements, so that the actual application of the block chain technology is influenced.
Disclosure of Invention
In order to overcome the defects, the invention provides a contract automatic deployment method and a system, in the execution process, no professional is required to write codes, compile and finally package the transaction to complete the signing of the intelligent block chain contract, so that the execution efficiency of the intelligent contract is improved, and the condition of the contract is guaranteed not to be falsified.
The purpose of the invention is realized by adopting the following technical scheme:
a method for automated contract deployment, the method comprising the steps of:
acquiring a predefined contract template file, and marking contract code parameter variables in the contract template file;
selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code;
the deployment code is compiled and packaged into transactions submitted to a blockchain network.
Preferably, the predefined contract template file comprises a text description area and at least one code area, and each contract code area comprises at least one contract code;
the distribution information of the text description area comprises a functional specification of each contract code;
the distribution information of the code regions includes parameter variables of each contract code.
Preferably, the predefined contract template file is a code template of a general function.
Preferably, the replacing the contract code parameter variable marked in the contract template, and the obtaining the deployment code includes:
determining the number N of filled parameter variables based on the character length of the marking area;
sequentially selecting N parameter variables, correspondingly inputting the N parameter variables into a pre-selected code template, and replacing the original parameter variables;
and acquiring the deployment code generated after the parameter variable is replaced.
Further, the deployment code generated after obtaining the replacement parameter variable includes:
a user sends a contract deployment instruction to a Web management platform;
the Web management platform analyzes the deployment instruction;
and establishing connection with a corresponding contract code according to the parameter variable in the deployment instruction, deploying and operating the contract on the Web management platform, and automatically generating a deployment code obtained after replacing the parameter variable.
Preferably, the compiling and packaging the deployment code into a transaction to be submitted to the blockchain network comprises:
compiling the deployment code for the second time by using a program command of the compilation contract to generate a compiled code;
and executing signature transaction on the compiled code by adopting the built-in secret key, connecting the blockchain gateway and submitting the transaction to the blockchain network.
A contract automation deployment system, the system comprising:
the acquisition module is used for acquiring a predefined contract template file and marking contract code parameter variables in the contract template file;
the deployment module is used for selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code;
and the compiling module is used for compiling and packaging the deployment codes into transactions and submitting the transactions to the blockchain network.
Preferably, the deployment module includes:
the defining unit is used for determining the number N of the filled parameter variables based on the character length of the marking area;
the updating unit is used for sequentially selecting N parameter variables, correspondingly inputting the N parameter variables into a pre-selected code template and replacing the original parameter variables;
and the contract generating unit is used for obtaining the deployment code generated after the parameter variable is replaced.
Further, the generation unit includes:
the instruction sending subunit is used for sending a contract deployment instruction to the Web management platform by a user;
the analysis subunit is used for analyzing the deployment instruction by the Web management platform;
and the deployment subunit is used for establishing connection with the corresponding contract code according to the parameter variable in the deployment instruction, deploying and operating the contract on the Web management platform, and automatically generating the deployment code obtained after replacing the parameter variable.
Preferably, the compiling module includes:
the compiling unit is used for compiling by using a program command of the compilation contract, and secondarily compiling the deployment code to generate a compiled code;
and the signature module is used for executing signature transaction on the compiled code by adopting the built-in secret key, connecting the block chain gateway and submitting the transaction to the block chain network.
The invention has the beneficial effects that:
the invention provides a contract automatic deployment method and a system, which comprises the steps of obtaining a predefined contract template file, and marking contract code parameter variables in the contract template file; selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code; and finally, compiling and packaging the deployment codes into transactions and submitting the transactions to a blockchain network, thereby overcoming the defects of complicated procedures and inconvenience in traditional contract deployment, wherein professionals are required to compile the codes and finally package the transactions until the blockchain intelligent contract signing is completed. Through the scheme, the execution efficiency of the intelligent contract is improved, and the reliability of the application information and the irrevocability of contract terms are guaranteed.
The invention adopts the code template with the universal function and is input by a system administrator, so that users with the same requirements do not need to write codes by themselves, and the application of non-professional users to the block chain technology is solved.
Secondly, the user can customize the parameters related to the functions so as to meet the slight difference of different users on the specific functions. Finally, the contract code needs to be used after deployment, a certain digital asset needs to be paid for deployment as a commission fee, and the key with the digital asset needs to be signed. Please show the beneficial effects of the present application compared to the prior art, which are explained according to the aforementioned technical means. The technical scheme is ensured to realize corresponding technical effects.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.
Fig. 1 is a flowchart of a contract automated deployment method according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
It is to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which the invention pertains.
The invention provides a contract automatic deployment method, users need to compile contract codes by themselves according to the original contract release technology, compile contracts, pack transactions by using keys, meanwhile, the keys need certain digital assets as commission fees, and finally submit the transactions through a blockchain gateway.
The invention enables the user to automatically deploy the corresponding contract by filling in the contract parameters through the visual interface. The system mainly comprises a web management platform for providing user operation, a user can see the introduction of a preset contract code and the function thereof after logging in the platform through a browser, the information is input in advance by a system administrator through a background management system, parameters needing to be configured are displayed after the contract needing to be deployed is selected, and the parameters are stored in a database after the user inputs the parameters.
Secondly, operating contract deployment by the user, clicking a deployment button on a page, and acquiring the contract and the parameters of the user by the system to replace variables in the contract.
Finally, compilation is ordered using a solc (program to compile the contract), then the transaction is signed with the built-in key, the blockchain gateway is connected and the transaction is submitted to the network. The Web management platform provides the user with the needed contract function and the parameter customization, the background program mainly realizes the automatic compiling and packaging, and the block chain client is also operated by the background program. The user can see the contract deployment state and the deployment result through the web management platform.
As shown in fig. 1, the method comprises the steps of:
s1, acquiring a predefined contract template file, and marking contract code parameter variables in the contract template file;
s2, selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code;
s3, compiling and packaging the deployment code into transaction and submitting the transaction to the blockchain network.
In step S1, the predefined contract template file includes a text description area and at least one code area, each contract code area includes at least one contract code;
the distribution information of the text description area comprises a functional specification of each contract code;
the distribution information of the code regions includes parameter variables of each contract code.
For example, a commodity has a packing box, the packing box is a predefined contract template, the packing box has a commodity description, and the commodity itself is really used. The contract code selected by the user is selected according to the requirements of the user, and specific contract functions are added when the contract code is actually used, such as an automatic vending machine, and the commodities sold in the automatic vending machine are not necessary and are added according to an administrator.
Wherein the predefined contract template file is a code template of a general function. The contract parameters need to know the fields according to the specific contract contents, such as a contract for realizing the issuing of the token, the name of the token, the total issuing amount and the number of decimal points.
In step S2, replacing the contract code parameter variable marked in the contract template, and obtaining the deployment code includes:
determining the number N of filled parameter variables based on the character length of the marking area;
sequentially selecting N parameter variables, correspondingly inputting the N parameter variables into a pre-selected code template, and replacing the original parameter variables;
and acquiring the deployment code generated after the parameter variable is replaced.
Further, the deployment code generated after obtaining the replacement parameter variable includes:
a user sends a contract deployment instruction to a Web management platform;
the Web management platform analyzes the deployment instruction;
and establishing connection with a corresponding contract code according to the parameter variable in the deployment instruction, deploying and operating the contract on the Web management platform, and automatically generating a deployment code obtained after replacing the parameter variable.
In step S3, compiling and packaging the deployment code into a transaction, and submitting the transaction to the blockchain network includes:
compiling the deployment code for the second time by using a program command of the compilation contract to generate a compiled code; the contract is readable text code before compiling and binary data such as 0101 after compiling.
And executing signature transaction on the compiled code by adopting the built-in secret key, connecting the blockchain gateway and submitting the transaction to the blockchain network.
Based on the same technical concept, the specific embodiment of the invention also provides a contract automatic deployment system, which comprises:
the acquisition module is used for acquiring a predefined contract template file and marking contract code parameter variables in the contract template file;
the deployment module is used for selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code;
and the compiling module is used for compiling and packaging the deployment codes into transactions and submitting the transactions to the blockchain network.
Wherein, the deployment module includes:
the defining unit is used for determining the number N of the filled parameter variables based on the character length of the marking area;
the updating unit is used for sequentially selecting N parameter variables, correspondingly inputting the N parameter variables into a pre-selected code template and replacing the original parameter variables;
and the contract generating unit is used for obtaining the deployment code generated after the parameter variable is replaced.
The generating unit further comprises:
the instruction sending subunit is used for sending a contract deployment instruction to the Web management platform by a user;
the analysis subunit is used for analyzing the deployment instruction by the Web management platform;
and the deployment subunit is used for establishing connection with the corresponding contract code according to the parameter variable in the deployment instruction, deploying and operating the contract on the Web management platform, and automatically generating the deployment code obtained after replacing the parameter variable.
The compiling module comprises:
the compiling unit is used for compiling by using a program command of the compilation contract, and secondarily compiling the deployment code to generate a compiled code;
and the signature module is used for executing signature transaction on the compiled code by adopting the built-in secret key, connecting the block chain gateway and submitting the transaction to the block chain network.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
Claims (10)
1. A method for automated contract deployment, the method comprising the steps of:
acquiring a predefined contract template file, and marking contract code parameter variables in the contract template file;
selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code;
the deployment code is compiled and packaged into transactions submitted to a blockchain network.
2. The method of claim 1, wherein the predefined contract template file includes a textual description area and at least one code area, each contract code area including at least one contract code;
the distribution information of the text description area comprises a functional specification of each contract code;
the distribution information of the code regions includes parameter variables of each contract code.
3. The method of claim 1, wherein the predefined contract template file is a universal function code template.
4. The method of claim 1, wherein replacing contract code parameter variables marked in a contract template to obtain deployment code comprises:
determining the number N of filled parameter variables based on the character length of the marking area;
sequentially selecting N parameter variables, correspondingly inputting the N parameter variables into a pre-selected code template, and replacing the original parameter variables;
and acquiring the deployment code generated after the parameter variable is replaced.
5. The method of claim 4, wherein the obtaining deployment code generated after replacing parameter variables comprises:
a user sends a contract deployment instruction to a Web management platform;
the Web management platform analyzes the deployment instruction;
and establishing connection with a corresponding contract code according to the parameter variable in the deployment instruction, deploying and operating the contract on the Web management platform, and automatically generating a deployment code obtained after replacing the parameter variable.
6. The method of claim 1, wherein compiling and packaging the deployment code into a transaction for submission to a blockchain network comprises:
compiling the deployment code for the second time by using a program command of the compilation contract to generate a compiled code;
and executing signature transaction on the compiled code by adopting the built-in secret key, connecting the blockchain gateway and submitting the transaction to the blockchain network.
7. A contract automation deployment system, the system comprising:
the acquisition module is used for acquiring a predefined contract template file and marking contract code parameter variables in the contract template file;
the deployment module is used for selecting a corresponding contract template according to actual needs, and replacing contract code parameter variables marked in the contract template to obtain a deployment code;
and the compiling module is used for compiling and packaging the deployment codes into transactions and submitting the transactions to the blockchain network.
8. The system of claim 7, wherein the deployment module comprises:
the defining unit is used for determining the number N of the filled parameter variables based on the character length of the marking area;
the updating unit is used for sequentially selecting N parameter variables, correspondingly inputting the N parameter variables into a pre-selected code template and replacing the original parameter variables;
and the contract generating unit is used for obtaining the deployment code generated after the parameter variable is replaced.
9. The system of claim 8, wherein the generating unit comprises:
the instruction sending subunit is used for sending a contract deployment instruction to the Web management platform by a user;
the analysis subunit is used for analyzing the deployment instruction by the Web management platform;
and the deployment subunit is used for establishing connection with the corresponding contract code according to the parameter variable in the deployment instruction, deploying and operating the contract on the Web management platform, and automatically generating the deployment code obtained after replacing the parameter variable.
10. The system of claim 7, wherein the compiling module comprises:
the compiling unit is used for compiling by using a program command of the compilation contract, and secondarily compiling the deployment code to generate a compiled code;
and the signature module is used for executing signature transaction on the compiled code by adopting the built-in secret key, connecting the block chain gateway and submitting the transaction to the block chain network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110188883.3A CN112967011A (en) | 2021-02-19 | 2021-02-19 | Contract automatic deployment method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110188883.3A CN112967011A (en) | 2021-02-19 | 2021-02-19 | Contract automatic deployment method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112967011A true CN112967011A (en) | 2021-06-15 |
Family
ID=76285062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110188883.3A Pending CN112967011A (en) | 2021-02-19 | 2021-02-19 | Contract automatic deployment method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112967011A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933404A (en) * | 2018-12-12 | 2019-06-25 | 阿里巴巴集团控股有限公司 | A kind of decoding method and system based on block chain intelligence contract |
CN109976871A (en) * | 2018-12-28 | 2019-07-05 | 无锡井通网络科技有限公司 | Intelligent contract dispositions method, device, electronic equipment and storage medium |
CN110675256A (en) * | 2019-08-30 | 2020-01-10 | 阿里巴巴集团控股有限公司 | Method and device for deploying and executing intelligent contracts |
CN110704063A (en) * | 2019-09-30 | 2020-01-17 | 支付宝(杭州)信息技术有限公司 | Method and device for compiling and executing intelligent contract |
CN111768187A (en) * | 2020-08-31 | 2020-10-13 | 支付宝(杭州)信息技术有限公司 | Method for deploying intelligent contract, block chain node and storage medium |
-
2021
- 2021-02-19 CN CN202110188883.3A patent/CN112967011A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933404A (en) * | 2018-12-12 | 2019-06-25 | 阿里巴巴集团控股有限公司 | A kind of decoding method and system based on block chain intelligence contract |
CN109976871A (en) * | 2018-12-28 | 2019-07-05 | 无锡井通网络科技有限公司 | Intelligent contract dispositions method, device, electronic equipment and storage medium |
CN110675256A (en) * | 2019-08-30 | 2020-01-10 | 阿里巴巴集团控股有限公司 | Method and device for deploying and executing intelligent contracts |
CN110704063A (en) * | 2019-09-30 | 2020-01-17 | 支付宝(杭州)信息技术有限公司 | Method and device for compiling and executing intelligent contract |
CN111768187A (en) * | 2020-08-31 | 2020-10-13 | 支付宝(杭州)信息技术有限公司 | Method for deploying intelligent contract, block chain node and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110825362B (en) | Low-code application software development system and method | |
US20100235275A1 (en) | Card Processing | |
US7392162B1 (en) | System and method for device developing model networks purely by modelling as meta-data in a software application | |
CN109657215A (en) | Document structure tree method, equipment, storage medium and device based on template | |
US20080109780A1 (en) | Method of and apparatus for optimal placement and validation of i/o blocks within an asic | |
EP1830275A1 (en) | Information distribution system | |
CN111695805B (en) | Intelligent contract model construction method and system for legal contracts | |
US20170300305A1 (en) | Executable guidance experiences based on implicitly generated guidance models | |
Fursin | Collective knowledge: organizing research projects as a database of reusable components and portable workflows with common interfaces | |
KR102226463B1 (en) | UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same | |
CN104657274A (en) | Method and device for testing software interface | |
US7275231B2 (en) | High level validation of designs and products | |
US6611817B1 (en) | Automated technique for code generation of datastream mappings | |
CN109885290B (en) | Application program service description information generation and release method, device and storage medium | |
CN115202639A (en) | Code generation method, device, equipment and storage medium based on custom module | |
CN104081347A (en) | Graphical representation of an order of operations | |
CN101553794B (en) | Rehosting method which convert mainframe system into open system | |
CN112965721A (en) | Android-based project compiling method and device, computer equipment and storage medium | |
CN112967011A (en) | Contract automatic deployment method and system | |
CN113687827B (en) | Data list generation method, device and equipment based on widget and storage medium | |
CN115048920A (en) | Front-end data exporting method, device, equipment and storage medium | |
CN104765602B (en) | The Quantitatively Selecting method of nonfunction requirement implementation strategy | |
CN114385155A (en) | vue project visualization tool generation method, device, equipment and storage medium | |
Nousias et al. | Modelling the development and deployment of decentralized applications in Ethereum blockchain: a BPMN-based approach | |
KR101843092B1 (en) | Method for verifying multiple insurance computer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |