CN116012121A - Auction method and device based on blockchain and electronic equipment - Google Patents

Auction method and device based on blockchain and electronic equipment Download PDF

Info

Publication number
CN116012121A
CN116012121A CN202211627229.9A CN202211627229A CN116012121A CN 116012121 A CN116012121 A CN 116012121A CN 202211627229 A CN202211627229 A CN 202211627229A CN 116012121 A CN116012121 A CN 116012121A
Authority
CN
China
Prior art keywords
auction
contract
information
account
smart contract
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
Application number
CN202211627229.9A
Other languages
Chinese (zh)
Inventor
王耿
顾费勇
李刚锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211627229.9A priority Critical patent/CN116012121A/en
Publication of CN116012121A publication Critical patent/CN116012121A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an auction method and device based on a blockchain and electronic equipment. The method is applied to a blockchain node including deploying a first smart contract and a second smart contract, and includes: receiving a transaction request which is sent by a purchaser and calls a first intelligent contract, wherein the transaction request comprises signature information of an auction party and purchase information of the purchaser, the signature information comprises auction conditions of the auction party for tokens in a second intelligent contract, and the purchase information comprises information that the purchaser pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract; invoking auction transaction logic in the first intelligent contract, and triggering the auction transaction logic according to the transaction request, the auction transaction logic comprising at least: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of the token in the second smart contract. The method can improve the flexibility of the auction method based on the blockchain.

Description

Auction method and device based on blockchain and electronic equipment
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to an auction method and apparatus based on a blockchain, and an electronic device.
Background
The blockchain technology refers to a technical scheme for collectively maintaining a reliable database in a mode of decentralization and trust removal, and is a bottom technology of digital currency such as bitcoin, ethernet coin and the like. In other words, blockchain technology refers to a way for the citizen to participate in billing. Transaction confirmation on the blockchain is completed by consensus of all nodes on the blockchain, and after the consensus is successful, the blocks are packed and written. The blockchain maintains a common ledger for storing all transactions on the blockchain network. Blockchain 2.0 implements a more complex distributed contract record, namely smart contract, on behalf of ethernet. An intelligent contract is a computer protocol that aims to propagate, verify, or execute contracts in an informative manner. A smart contract is a set of digitally defined commitments that control digital assets and contain rights and obligations contracted by contract participants, which are automatically executed by a computer system. The contracts are recorded in the blockchain, and once the triggering condition of the contracts is met, the predefined code logic can be executed autonomously, and the result after execution is uplink unchangeable. After executing the transaction on the intelligent contract on the blockchain, the data associated with the transaction can be queried from the account book maintained by the blockchain, and the data associated with the transaction can be analyzed to obtain the specific situation of the transaction, and the like. In a blockchain network-based business mode, a user can trigger each node in the blockchain network to execute business through an intelligent contract in a mode of submitting business transaction to the blockchain network.
With the development of blockchain technology, network auction modes based on the blockchain technology are becoming popular. In the method for auctioning the auction objects associated with the intelligent contracts deployed in the blockchain network provided by the conventional technology, the auction contracts corresponding to the auction objects need to be deployed on the blockchain, the auction contracts include auction intents (such as auction time and/or auction price) for auctioning the auction objects, and the auction intents are preset. If the auctioneer needs to modify the auction object or auction intention, the auction contract corresponding to the modified auction object or auction intention needs to be redeployed on the blockchain. It can be known that the auction method based on the blockchain provided by the conventional technology is difficult to flexibly update the auction contract according to actual requirements, so that the auction method based on the blockchain has an inflexible problem.
Accordingly, there is a need for a blockchain-based auction method that can increase the flexibility of the blockchain-based auction method.
Disclosure of Invention
The application provides a block chain based auction method, a block chain based auction device and electronic equipment.
A first aspect of an embodiment of the present application provides a blockchain-based auction method applied to a blockchain node including deploying a first smart contract and a second smart contract, the method including: receiving a transaction request sent by a buyer and calling the first intelligent contract, wherein the transaction request comprises signature information of a claimant and purchase information of the buyer, the signature information comprises auction conditions of the claimant for tokens in the second intelligent contract, and the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract; invoking auction transaction logic in the first intelligent contract, and triggering the auction transaction logic according to the transaction request, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
A second aspect of an embodiment of the present application provides a blockchain-based auction method applied to a auction party, the method including: generating signature information of the auction party according to auction conditions of the auction party for the tokens in a second intelligent contract, wherein the second intelligent contract is deployed in a blockchain node, and the signature information comprises auction conditions of the auction party for the tokens in the second intelligent contract; sending signature information of the auction party, so that a buyer sends a transaction request for calling a first intelligent contract to the blockchain node according to the purchase information of the buyer and the acquired signature information of the auction party to call auction transaction logic in the first intelligent contract; wherein the purchase information includes information that the purchaser pays a price to the first smart contract to purchase tokens in the second smart contract; the auction transaction logic includes at least: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract; the first smart contract is deployed in the blockchain node.
A third aspect of embodiments of the present application provides a blockchain-based auction method applied to a buyer, the method including: acquiring signature information of a clapper, wherein the signature information comprises auction conditions of the clapper for tokens in the second intelligent contract; generating a transaction request for calling a first intelligent contract according to the purchase information of the buyer and the signature information, wherein the transaction request comprises the purchase information of the buyer and the signature information of the auctioneer, the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract, and the first intelligent contract and the second intelligent contract are deployed in a blockchain node; sending the transaction request for calling the first intelligent contract to the blockchain node to trigger auction transaction logic in the first intelligent contract, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
A fourth aspect of the present embodiments provides a blockchain-based auction apparatus for use with blockchain nodes including deployment of a first smart contract and a second smart contract, the apparatus comprising: the receiving and transmitting unit is used for: receiving a transaction request sent by a buyer and calling the first intelligent contract, wherein the transaction request comprises signature information of a claimant and purchase information of the buyer, the signature information comprises auction conditions of the claimant for tokens in the second intelligent contract, and the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract; the processing unit is used for: invoking auction transaction logic in the first intelligent contract, and triggering the auction transaction logic according to the transaction request, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
A fifth aspect of embodiments of the present application provides a blockchain-based auction apparatus for use with a auctioneer, the apparatus comprising: the device comprises: the processing unit is used for: generating signature information of the auction party according to auction conditions of the auction party for the tokens in a second intelligent contract, wherein the second intelligent contract is deployed in a blockchain node, and the signature information comprises auction conditions of the auction party for the tokens in the second intelligent contract; the receiving and transmitting unit is used for: sending signature information of the auction party, so that a buyer sends a transaction request for calling a first intelligent contract to the blockchain node according to the purchase information of the buyer and the acquired signature information of the auction party to call auction transaction logic in the first intelligent contract; wherein the purchase information includes information that the purchaser pays a price to the first smart contract to purchase tokens in the second smart contract; the auction transaction logic includes at least: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract; the first smart contract is deployed in the blockchain node.
A sixth aspect of embodiments of the present application provides a blockchain-based auction device for use by a buyer, the device comprising: the receiving and transmitting unit is used for: acquiring signature information of a clapper, wherein the signature information comprises auction conditions of the clapper for tokens in the second intelligent contract; the processing unit is used for: generating a transaction request for calling a first intelligent contract according to the purchase information of the buyer and the signature information, wherein the transaction request comprises the purchase information of the buyer and the signature information of the auctioneer, the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract, and the first intelligent contract and the second intelligent contract are deployed in a blockchain node; the transceiver unit is further configured to: sending the transaction request for calling the first intelligent contract to the blockchain node to trigger auction transaction logic in the first intelligent contract, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
A seventh aspect of the embodiments of the present application further provides a computer readable storage medium having one or more computer instructions stored thereon, where the instructions are executed by a processor to implement a method according to any one of the foregoing aspects.
An eighth aspect of the embodiments of the present application further provides an electronic device, including: a processor; and a memory for storing a data processing program, the server being powered on and executing the program by the processor, to perform the method as described above.
It should be understood that the description in this section is not intended to identify key or critical features of the disclosed embodiments of the application, nor is it intended to be used to limit the scope of the disclosed embodiments of the application. Other features of the present disclosure will become apparent from the following specification.
In the technical scheme of the blockchain-based auction method provided by the embodiment of the application, the transaction request of calling the first intelligent contract by the purchaser carries signature information of the seller and purchase information of the purchaser, wherein the signature information comprises auction conditions of the seller for the tokens in the second intelligent contract, and the purchase information comprises information that the purchaser pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract; and the second smart contract authorizes the first smart contract to modify an owner of the token in the second smart contract. Further, after receiving a transaction request which is sent by the buyer and calls the first intelligent contract, the block link point calls auction transaction logic in the first intelligent contract, and the auction transaction logic is triggered according to the transaction request. In the above implementation, the auction condition of the auctioneer for the tokens in the second smart contract is carried by the transaction request of the buyer invoking the first smart contract, in other words, the auction condition of the auctioneer for the tokens in the second smart contract is not set in the first smart contract; and the transaction request of the buyer invoking the first intelligent contract is determined according to the signature information of the auction party sent by the auction party. Based on this arrangement, when the auctioneer needs to change the auction conditions for tokens in the second smart contract, only the purchaser needs to generate a new transaction request based on the modified auction conditions; and triggering auction transaction logic in the first intelligent contract with the new transaction request to achieve the corresponding auction. In this implementation, the new first intelligent contract corresponding to the modified auction condition does not need to be redeployed in the blockchain node, so that the flexibility of the blockchain-based auction method can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario suitable for the blockchain-based auction method provided in the embodiments of the present application.
FIG. 2 is a schematic diagram of a method of creating and invoking a smart contract suitable for use in the blockchain-based auction method provided by embodiments of the present application.
Fig. 3 is a schematic diagram of a blockchain-based auction method according to an embodiment of the present application.
Fig. 4 is a schematic diagram of another blockchain-based auction method provided in an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an auction apparatus based on blockchain according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a blockchain-based auction system according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present application, the present application is clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. This application is intended to be limited to the details shown and described, and it is intended that the invention not be limited to the particular embodiment disclosed, but that the application will include all embodiments falling within the scope of the appended claims.
It should be noted that the terms "first," "second," "third," and the like in the claims, specification, and drawings herein are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. The data so used may be interchanged where appropriate to facilitate the embodiments of the present application described herein, and may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and their variants are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, technical terms involved in the embodiments of the present application will be first described.
1, blockchain (Block chain)
Blockchain refers to a chain of blocks one after the other. Each block holds certain information which is linked in a chain according to the time sequence of their respective generation. This chain is kept in all servers, and the entire blockchain is secure as long as one server in the entire system can work. These servers, referred to in the blockchain system as blockchain nodes (simply nodes), provide storage space and computational support for the entire blockchain system. If the information in the blockchain is to be modified, it is necessary to sign consent of more than half of the nodes and modify the information in all the nodes, which are usually held in different subject hands, so it is an extremely difficult thing to tamper with the information in the blockchain. Compared with the traditional network, the blockchain has two main core characteristics: firstly, the data is difficult to tamper, and secondly, the data is decentralised. Based on the two characteristics, the information recorded by the blockchain is more real and reliable, and can help solve the problem that people are not trusted each other.
Blockchains are generally divided into three types: public blockchain (public block chains), federated blockchain (consortium block chains), private blockchain (private block chains). Wherein the definition of the public blockchain is as follows: any individual or group in the world can send a transaction and the transaction can get a valid confirmation of the blockchain and anyone can participate in its consensus process. The definition of the federated blockchain is as follows: designating a plurality of preselected nodes as billable persons from within a certain group, the generation of each block is decided jointly by all preselected nodes (the preselected nodes participate in the consensus process), other access nodes can participate in the transaction, but do not have the accounting process (whether accounting is hosted in nature or just becomes distributed accounting, how many of the preselected nodes decide how billable persons for each block become the main risk points for the blockchain), and other persons can make a limited query through the blockchain open API. The definition of the private blockchain is as follows: accounting is performed by using only the general ledger technique of the blockchain, and the accounting can be a company or a person, and the writing authority of the blockchain is shared independently.
2, blockchain account
The three major elements of the blockchain account include: private key (private key), public key (public key), and account blockchain address.
The private key and the public key are the contents of an asymmetric encryption algorithm in cryptography. The public key may be public, while the private key is kept secure. The private key is generated from a random seed, and the public key is derived from the private key by an algorithm. Because the public key is too long, an "address" appears for simplicity and practicality, the address being derived from the public key. These derivation processes are unidirectional irreversible. That is, the public key cannot be deduced from the address, and the private key cannot be deduced from the public key.
3 Intelligent contract
Intelligent contracts are essentially a piece of programming that can be automatically executed if conditions previously agreed upon by the contract creator are met. The smart contracts enable the transaction process to be deterministic, the transaction outcome to be irreversible, and the transaction parties to be trusted to one another without third party notarization.
In ethernet, smart contracts refer specifically to a collection of codes and data that exist at a particular address created by an external account or other contract account number. After writing the smart contract in a high-level language (e.g., such as solubility), the user needs to compile it into bytecodes that the ethernet virtual machine (ethereum virtual machine, EVM) can run and deploy it on the ethernet in a manner that initiates the transaction. After the contract deployment is completed, the user can send a transaction call intelligent contract method to the contract address to realize the preset function of the contract creator. The method in the intelligent contract must be executed through transaction calling, and can be directly called by the transaction initiated by the external account or indirectly called by the internal transaction triggered by other contract accounts. Although the contract code cannot be modified after deployment, the contract code may be deleted by the opcode that initiates a transaction to execute the EVM on the contract.
4, etherfang (Etherum)
Ethernet is a common blockchain platform with smart contract functionality. Through the smart contract functionality provided by the ethernet, developers can build a wide variety of decentralized applications on the blockchain.
The ethernet is accounts, and the accounts of the ethernet are classified into two types, an external account and a contract account. Wherein the external account is similar to the external account in the bitcoin. An external account may be understood as an account directly controlled by a user, also referred to as a user account. The contract account of the Ethernet is an account generated after intelligent contract deployment is completed, and contract codes are stored in the contract account. A contract account may then be understood as an account created by a user through an external account, containing the smart contract code.
5, non-homogeneous token (NFT)
NFT is also known as a non-homogeneous syndrome. NFT generally refers to tokens issued by a developer on an ethernet platform according to the ERC-721 standard/protocol. NFT is a unique digital asset that is characterized as being indivisible, irreplaceable, unique. NFT can be valuable to most items in the real world under the chain, such as books, text, electronic vouchers, electronic tickets, art collections, props in online games, and other abstract items.
Since NFT is implemented through a smart contract, NFT has versatility, invariance, and programmability, i.e., anyone can deploy the smart contract of NFT according to the published standard, and NFT can contain more complex functions. One NFT in the smart contract corresponds to one NTF identification (Identity Document, ID, tokenId), i.e., the tokenId is used to represent the corresponding NFT. In theory, any article in real life can be anchored as an NFT, but the NFT needs to be published on a blockchain network according to a certain publishing standard, and the publishing standards corresponding to different blockchain platforms are different.
6, NFT token contracts
In NFT token contracts, some events (events) and functions (functions) may be included. Wherein events are used for event models, one event model comprising three components: event source (also called a listened object), event, and listener Listener. Firstly, a monitoring Callback function (Callback) is registered by a monitoring object, and after an event source triggers an event, the monitoring object receives event information through the monitoring Callback function and processes according to the event information. The function may specifically be an interface function, which is used to implement a certain function, such as a query function for querying how many token a user has, an authorization function for authorizing a certain token of the user to other users, and so on.
7, consensus mechanism
The consensus mechanism is to complete verification and confirmation of the transaction in a short time by voting of special nodes. For a transaction in a blockchain, if several nodes with irrelevant interests can agree on it, we can consider that the whole network can agree on it as well. Common consensus mechanisms include: a proof of work (POW), a proof of stock (POS), a practical bayer fault tolerance algorithm (practical byzantine fault tolerance, PBFT), etc.
8, digital signature (digital signature)
Digital signatures, also known as public key digital signatures. A digital signature is a digital string that cannot be forged by others only the sender of the information, and is also a valid proof of the authenticity of the information sent by the sender of the information. It is a method for authenticating digital information that resembles a common physical signature written on paper, but is implemented using techniques in the field of public key cryptography. A set of digital signatures typically defines two complementary operations, one for signing and the other for verification. Digital signature is the application of asymmetric key encryption technology and digital digest technology.
The blockchain technology is constructed on a peer-to-peer (P2P) network, uses a chained data structure to verify and store data, uses a distributed node consensus algorithm to generate and update data, uses a cryptography mode to ensure the safety of data transmission and access, and uses an intelligent contract consisting of an automatic script code to program and operate a brand new distributed infrastructure and a computing paradigm of the data. In the blockchain, consensus data in the blockchain is generated by sending a transaction (transaction) and causing the transaction to be performed by a node. The transaction may include a call to a smart contract such that, upon execution of the transaction, a change to a world state is generated by execution of the smart contract, the world state including, for example, an account balance, a stored variable of the smart contract, and the like.
The computing device may construct the data into a standard transaction format supported by the blockchain, then issue the data to the blockchain, perform consensus processing on the received transaction by node devices in the blockchain, and after consensus is achieved, package the transaction into a block by node devices in the blockchain that act as billing nodes, and persist in the blockchain.
Each time a blockchain generates a latest block, after a transaction in the latest block is executed, the corresponding states of the executed transactions in the blockchain change accordingly, for example, the states of external accounts or contract accounts of intelligent contracts in the blockchain (e.g. ethernet) with account model architecture generally change correspondingly with the execution of the transaction. The external account is an account directly controlled by the user, also called a user account, and the contract account is an account created by the user through the external account and containing the smart contract code. For example, when a "transfer transaction" in a block is completed, the balances of the transfer account and the transfer account associated with the "transfer transaction" (i.e., the field values of the Balance fields of these accounts) will typically change. For another example, the "intelligent contract invoking transaction" in the block is used to invoke the intelligent contract deployed on the blockchain, invoke the intelligent contract in the EVM corresponding to the node device to execute the "intelligent contract invoking transaction", and update the account status of the intelligent contract account in the account of the intelligent contract after executing the intelligent contract invoking transaction.
In practical applications, whether public, private or federated, it is possible to provide smart contract (smart contract) functionality. Intelligent contracts on a blockchain are contracts on a blockchain that can be executed by a transaction trigger. The smart contracts may be defined in the form of codes. Taking the ethernet as an example, a user is supported to create and invoke some complex logic in the ethernet network. The ethernet is used as a programmable blockchain, and the core of the ethernet is an Ethernet Virtual Machine (EVM), and each ethernet node can run the EVM. EVM is a graphics-based virtual machine through which various complex logic can be implemented. The user's issuing and invoking of the smart contract in the ethernet is running on the EVM. In fact, the EVM runs directly on virtual machine code (virtual machine bytecode, hereinafter "bytecode"), so the smart contract deployed on the blockchain may be bytecode.
With the development of blockchain technology, network auction modes based on the blockchain technology are becoming popular. In the method for auctioning the auction objects associated with the intelligent contracts deployed in the blockchain network provided by the conventional technology, the auction contracts corresponding to the auction objects need to be deployed on the blockchain, the auction contracts include auction intents (such as auction time and auction price) for auctioning the auction objects, and the auction intents are preset. For example, auction intents include: the auction duration was 7 days, and the auction price gradually decreased over time. In the above-described auction process, if the auctioneer needs to modify the auction object or the auction intention, it is necessary to redeploy the auction contract corresponding to the modified auction object or auction intention on the blockchain. It can be known that the auction method based on the blockchain provided by the conventional technology is difficult to flexibly update the auction contract according to actual requirements, so that the auction method based on the blockchain has an inflexible problem.
In order to solve the problems, the application provides an auction method, an auction device and electronic equipment based on a blockchain.
Hereinafter, an application scenario of the blockchain-based auction method and the blockchain-based auction method applied to the embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the following embodiments and features thereof may be combined with each other without conflict between the embodiments provided in the present application. In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
First, an application scenario of the blockchain-based auction method applicable to the embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an application scenario suitable for the blockchain-based auction method provided in the embodiments of the present application. As shown in fig. 1, the application scenario includes: client 110, client 120, and blockchain network 130, wherein blockchain network 130 includes nodes 1 through 6.
Illustratively, referring to the flow of creating a smart contract in the application scenario shown in fig. 1, bob sends a transaction (transaction) 1 containing information of creating a smart contract to the blockchain 130, each node included in the blockchain 130 may execute the transaction in the EVM. The From field of the transaction 1 shown in fig. 1 is used To record an address of an account initiating creation of an intelligent contract, a contract code stored by a field value of a Data field of the transaction 1 may be a byte code, and a field value of a To field of the transaction 1 is an account with null. After agreement is reached between the nodes included in the blockchain 130 through the consensus mechanism, the intelligent contract corresponding to the transaction 1 is successfully created on each node of the blockchain 130 package, and the subsequent user can call the intelligent contract corresponding to the transaction 1. The Data field of transaction 1 described above for creating a smart contract may hold the bytecode for that smart contract. Bytecode consists of a series of bytes, each of which can identify an operation. Based on various aspects of development efficiency, readability and the like, a developer can select a high-level language to write intelligent contract codes instead of directly writing byte codes. For example, a high-level language such as Solidity, serpent, or LLL language, etc. may be employed. For smart contract code written in a high-level language, it may be compiled by a compiler to generate bytecodes that may be deployed onto a blockchain. Taking the Solidity language as an example, the contract code written by the method is similar to the Class (Class) in the object-oriented programming language, and various members including state variables, functions, function modifiers, events and the like can be declared in one contract. The state variable is a value permanently stored in an account store (Storage) field of the smart contract for saving the state of the contract.
After the smart contract is created, each node included in the blockchain 130 locally records a contract account (contract accounts) corresponding to the smart contract corresponding to transaction 1, the contract account corresponding to a specific address. Illustratively, the blockchain 130 shown in FIG. 1 includes an address of "0x68e13f …" recorded locally for each node, representing the address of the contract account of the smart contract corresponding to created transaction 1; the contract Code (Code) and the account store (Storage) will be saved in the account store of the contract account. The behavior of the smart contract is controlled by the contract code, and the contract account store of the smart contract maintains the state of the contract. In other words, the smart contract causes a virtual account to be generated on the blockchain that includes the contract code and the contract account store.
Illustratively, referring to the flow of invoking the smart contract in the application scenario shown in fig. 1, alice sends a transaction 2 containing information of invoking the smart contract to the blockchain 130, and each node included in the blockchain 130 may execute the transaction in the EVM. The From field of the transaction 2 shown in fig. 1 is used for recording an address of an account initiating a call To the smart contract, the To field is used for recording an address of the called smart contract, and the Data field of the transaction 2 is used for recording a method and parameters for calling the smart contract. After invoking the smart contract, the account status of the contract account may change. Subsequently, a client may view the account status of the contract account through any node included in the accessed blockchain 130, e.g., the account status may be stored in a Storage tree of the smart contract in the form of a key-value (key-value) pair. The execution result of the transaction invoking the smart contract may be stored in the merck prefix tree (merkle patricia trie, MPT) receipt tree in the form of a transaction receipt (receipt).
The intelligent contract can be independently executed at each node in the blockchain network in a specified mode, all execution records and data are stored on the blockchain, so that when the transaction is executed, transaction credentials which cannot be tampered and cannot be lost are stored on the blockchain.
It should be understood that the application scenario shown in fig. 1 is merely illustrative, and does not constitute any limitation on the application scenario applicable to the blockchain-based auction method provided in the embodiments of the present application.
FIG. 2 is a schematic diagram of a method of creating and invoking a smart contract suitable for use in the blockchain-based auction method provided by embodiments of the present application.
Illustratively, referring to FIG. 2, to create a smart contract in a blockchain (e.g., ethernet) requires a process of writing the smart contract, becoming bytecode, deploying to the blockchain, and so on. Invoking the intelligent contract in the blockchain initiates a transaction pointing to the intelligent contract address, and EVM of each node included in the blockchain can execute the transaction respectively, so that intelligent contract codes are distributed and run in virtual machines of each node included in the blockchain.
For accounts in a blockchain, the account status of the account is typically maintained by a structure. When a transaction in a block is executed, the status of the account in the blockchain associated with the transaction will typically change. Illustratively, taking an ethernet as an example, the structure of an account may generally include the following fields: a Balance field, a Nonce field, a Code field, and a Storage field. Wherein: and a Balance field for maintaining the current account Balance of the account. A Nonce field for maintaining a number of transactions for the account; the counter is used for guaranteeing that each transaction can be processed only once, and effectively avoiding replay attack; a Code field for maintaining a contract Code for the account; in practice, the Code field is typically used to maintain the hash value of the contract Code. A Storage field for maintaining the stored contents of the account (default field value is null); for a contract account, a separate storage space is generally allocated to store the storage content of the contract account; this separate storage space is commonly referred to as the account store for the contract account. The storage content of the contract account is usually constructed into a data structure of an MPT tree and stored in the independent storage space; among them, the MPT tree constructed based on the stored contents of the contract account is also commonly referred to as Storage tree. Whereas the Storage field typically only maintains the root node of the Storage tree; thus, the Storage field is also commonly referred to as a Storage Root field. It should be noted that, for the external account (externally owned accounts), the field values of the Code field and the Storage field described above are null values. Wherein the external account is controlled by a key. For example, the external account may be a user account created by a user using a key.
Next, the auction method based on the blockchain provided in the embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 3 is a schematic diagram of a blockchain-based auction method according to an embodiment of the present application. The method shown in fig. 3 may be applied to the application scenario shown in fig. 1, but is not limited to the method. As shown in fig. 3, the blockchain-based auction method includes S301 to S305. Next, S301 to S305 will be described in detail.
The blockchain node in the embodiments of the present application may be any node in a blockchain. For example, when the blockchain is the blockchain 130 shown in fig. 1, any one of the nodes 1 to 6 in the blockchain 130 may be used as the blockchain node in the embodiment of the present application, that is, any one of the nodes 1 to 6 has the function of the blockchain node in the embodiment of the present application. The type of the blockchain is not particularly limited, and for example, the blockchain may be a public chain or a federated chain.
The blockchain node in the embodiments of the present application deploys a first smart contract and a second smart contract. Optionally, the blockchain node may deploy other intelligent contracts, which are not particularly limited.
Prior to performing S301 to S305 below, the present application may further include the relevant steps of deploying the first smart contract and the second smart contract in the block link points. Next, a method of deploying the above-described first smart contract and second smart contract in the block link point will be described. Optionally, in some implementations, the auction direction blockchain link transmits a transaction to create the first smart contract to successfully deploy the first smart contract in the blockchain node, wherein the transaction to create the first smart contract includes address information of the auctioneer and a contract code corresponding to the first smart contract. In this implementation, the first intelligent contract is deployed in the blockchain node by the auctioneer. Based on this, the auctioneer can also perform the following steps: and sending authorization information to the blockchain node, wherein the authorization information indicates that the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract. Optionally, in some implementations, the address information of the auctioneer is an account address of the auctioneer, and the account address of the auctioneer is recorded in the blockchain node; and the contract code corresponding to the first intelligent contract is byte code. The implementation of the foregoing "auction-direction blockchain node sending a transaction to create the first smart contract to successfully deploy the first smart contract in the blockchain node" is not particularly limited. For example, the first smart contract described above may be created with reference to the flow of creating smart contracts in blockchain 130 described above with respect to FIG. 1. The creator of the second smart contract is not particularly limited in this application. For example, the second smart contract may be created by an auction directed to the block link to send a transaction to create the smart contract. As another example, the second smart contract may be created by a third user, other than the auctioneer and the buyer, sending a transaction to the block link to create the smart contract.
Next, S301 to S305 will be described in detail.
S301, the auctioneer generates signature information of the auctioneer based on auction conditions of the auctioneer for the tokens in the second smart contract, wherein the second smart contract is deployed in the blockchain node, and the signature information includes auction conditions of the auctioneer for the tokens in the second smart contract.
In the embodiment of the present application, the clapper is the user of the blockchain node, i.e., the account of the clapper is recorded in the blockchain node. At least the account of the clapper is recorded with: account address information of the clapper and balance information corresponding to the account address of the clapper. Optionally, before performing S301 above, the auctioneer may also perform the following steps: and transmitting registration information to the blockchain node, wherein the registration information is information that the auction registers to the blockchain node to become a user of the blockchain node. The auctioneer may be any type of electronic device, for example, the auctioneer may be, but is not limited to being, a personal computer, a smart phone, a tablet, a server, or the like.
The number of tokens in the second smart contract, the items each token represents, and the type of each token are not particularly limited. For example, the second smart contract may include one or more tokens, each having a different identification. For example, tokens in the second smart contract may represent virtual items (e.g., a virtual avatar) or real items in the real world (e.g., an art drawing in the real world or a book in the real world). For example, in some implementations, the token is a non-homogenous token NFT. The claimant and the owners of tokens in the second smart contract are not particularly limited. That is, in embodiments of the present application, the clapper is the owner of the tokens in the second smart contract; alternatively, the auctioneer is an auction service that brokers auctions for all parties to tokens in the second smart contract.
The signature information includes auction conditions for the auction sellers for the tokens in the second smart contract. In some implementations, the signature information specifically includes: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is signature data generated by the auction party for the auction conditions using a private key of the auction party. It will be appreciated that the auctioneer has a pair of public and private key pairs, the private keys of which are owned by the auctioneer itself, and the public keys of which can be made public to all users of the blockchain node. The public key in the public-private key pair can restore the data processed by the private key in the public-private key pair; meanwhile, the private key in the public-private key pair can restore the data processed by the public key in the public-private key pair. The auction conditions for the tokens in the second smart contract by the auctioneer are used to represent at least any one of the following conditions: auction time slots, or auction prices, where the auctioneers auction tokens in the second smart contract. The auction period is not particularly limited. For example, the auction period may be from 2022, 11, 1, to 2022, 11, 2. As another example, the auction period may be a period of 2022, 11, 1, 14:00 to 2022, 11, 1, 19:00. The auction price is not particularly limited. For example, the auction price may be a fixed auction price, such as 1 ethernet. For another example, the auction price may also be a price range, such as 1 Ethernet to 3 Ethernet. Alternatively, the auction conditions may include conditions other than the auction period and the auction price, which are not particularly limited.
In practical applications, account mode may be adopted for transferring accounts between different users in the blockchain. For example, in an ethernet blockchain, the amount in the user account may be transferred to the contract account of the smart contract. In another example, in the Ethernet blockchain, the amount in user A's account is transferred to user B's account. Based on this, in some implementations, the blockchain node has recorded therein: a first contract account of a first smart contract, a second contract account of a second smart contract, an account of a claser that is a user of the blockchain node, and an account of a claser that is a user of the blockchain node, tokens in the second smart contract being recorded in the second contract account; the second contract account authorizes the first contract account to modify an owner of the tokens in the second contract account; the auction conditions include: auctioning the account of the claimant for the auction price of the tokens in the second contract account; the signature information specifically includes: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by an auction party for the auction information by using a private key of an auction party; the auction information includes an address of the second contract account and an identification of the token; the purchase information specifically includes: an account of the purchaser, a certain price paid by the account of the purchaser, and a first contract account.
The implementation of "the auctioneer generates signature information of the auctioneer based on the auctioneer' S conditions for tokens in the second intelligent contract" described in S301 above is not particularly limited. Illustratively, the following, signature information for the claser includes: the auction information corresponding to the auction conditions and the signature data corresponding to the auction information are exemplified, and a method of generating the signature information by the auctioneer is described. Wherein the auctioneer generates signature information for the auctioneer based on the auctioneer's auction conditions for the tokens in the second intelligent contract, comprising: the auction information corresponding to the auction conditions is hashed by the auction sellers to obtain abstract information 1; the auction party encrypts the abstract information 1 by using the private key of the auction party and adopting an asymmetric encryption algorithm to obtain signature data corresponding to the auction information; the auction information corresponding to the auction conditions and the signature data corresponding to the auction information are packed by the auction sellers to generate signature information of the auction sellers. The hash processing may also adopt a hash algorithm, and the hash algorithm is not particularly limited. For example, the hash algorithm may be, but is not limited to, a secure hash algorithm (secure hash algorithm, SHA).
S302, the auction party sends signature information of the auction party, so that the purchaser sends a transaction request for calling a first intelligent contract to the blockchain node according to the purchase information of the purchaser and the acquired signature information of the auction party, and the auction transaction logic in the first intelligent contract is triggered. Accordingly, the purchaser obtains signature information of the seller.
The above S302 describes a flow in which the auctioneer transmits signature information of the auctioneer so that the buyer obtains the signature information of the auctioneer. In the embodiment of the present application, the specific implementation manner in which the auctioneer sends the signature information of the auctioneer so that the buyer receives the signature information is not limited. In some implementations, sending signature information for a clapper includes: sending signature information to the purchaser; or sending the signature information to the third party platform so that the purchaser can acquire the signature information by accessing the third party platform. The type of the third party platform is not particularly limited. For example, the third party platform may be a web page, or an application, or the like.
In an embodiment of the application, the signature information of the auctioneer includes auction conditions of the auctioneer for tokens in the second smart contract. In practice, after the auctioneer sends signature information including auction conditions for the tokens in the second smart contract, the auctioneer can have auction conditions that require modification of the tokens in the second smart contract. Based on this, optionally, in some implementations, after the auctioneer performs S302 above, the following steps may also be performed: the auctioneer generates new signature information, wherein the new signature information includes auction conditions #1 for the tokens in the second smart contract by the auctioneer, the auction conditions #1 being different from the auction conditions described above; the new signature information is transmitted to enable the purchaser to acquire the new signature information. The auction conditions #1 and the auction conditions are not particularly limited. For example, auction information corresponding to auction condition #1 includes: the preset time period is 1 day, and the auction price is 1 Ethernet coin; the auction information corresponding to the auction conditions includes: the preset time period is 1 day, and the auction price is 2 ethercoins. In another example, auction information corresponding to auction condition #1 includes: the preset time period is 2022, 11 months 1 to 2022, 11 months 2, and the auction price is 1 ethernet coin; the auction information corresponding to the auction conditions includes: the preset time period is 2022, 11 months 2 to 2022, 11 months 5, and the auction price is 2 ethernet coins. It will be appreciated that the auction party will expire after sending the new signature information, and after executing the signature information sent in S302. That is, after the step of transmitting the new signature information is performed after the step S302, the signature information in the following steps S303 to S305 needs to be replaced with the new signature information.
S303, the buyer generates a transaction request for calling the first intelligent contract according to the purchase information and the signature information of the buyer, wherein the transaction request comprises the purchase information of the buyer and the signature information of the auctioneer, and the purchase information comprises the information that the buyer pays a certain price to the first intelligent contract to purchase the medal in the second intelligent contract.
Optionally, the buyer may also perform the step of obtaining the auctioneer's signature information prior to performing 303 as described above. In the embodiment of the present application, the manner in which the buyer obtains the signature information of the auctioneer is not limited. In some implementations, obtaining signature information of an auctioneer includes: receiving signature information sent by an auction party; or the signature information is obtained from a third party platform, wherein the signature information of the clapper is stored in the third party platform.
Optionally, before performing S303, the purchaser may further generate purchase information of the purchaser. In some implementations, the signature information specifically includes: the auction method comprises the steps of auction conditions and signature data corresponding to the auction conditions, wherein the signature data is generated by an auction party aiming at the auction conditions by utilizing a private key of an auction party; before generating the transaction request invoking the first smart contract based on the purchase information and the signature information, the method further comprises: verifying the validity of the signature information according to the public key disclosed by the auction party, wherein the private key of the auction party and the public key disclosed by the auction party are a pair of public and private key pairs; and when the signature information passes the validity verification, generating purchase information according to auction information corresponding to the auction conditions.
In the embodiment of the present application, the buyer is a user of the blockchain node, that is, an account of the buyer is recorded in the blockchain node. At least the account of the purchaser is recorded with: the account address information of the purchaser and balance information corresponding to the account address of the purchaser. Optionally, before performing 303, the purchaser may further perform the following steps: and transmitting registration information to the blockchain node, wherein the registration information is information of a user who registers to the blockchain node to become the blockchain node by purchasing the blockchain node.
It will be appreciated that after executing S303 above, a certain price paid by the purchaser is recorded in the first smart contract.
S304, the purchasing direction blockchain node sends a transaction request for calling the first intelligent contract to trigger auction transaction logic in the first intelligent contract. Accordingly, the block link point receives a transaction request sent by the buyer invoking the first smart contract.
The purchasing party may be any type of electronic device, such as, but not limited to, a personal computer, a smart phone, a tablet, a server, or the like.
The blockchain node is any node in the blockchain, and S304 is executed, that is, the purchasing sends a transaction request for calling the first intelligent contract to any node in the blockchain. The implementation of "send a transaction request invoking a first smart contract to any one node in the blockchain, i.e., the purchase direction," is not particularly limited. For example, a transaction request invoking a first smart contract is sent at a node, which may be a purchasing direction blockchain; after receiving the transaction request, the one node sends the transaction request to other nodes except the one node in the blockchain.
S305, the blockchain node invokes auction transaction logic in the first intelligent contract and triggers the auction transaction logic according to the transaction request, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of the token in the second smart contract.
In an embodiment of the present application, the block link point invokes auction transaction logic in the first smart contract and triggers the auction transaction logic according to the transaction request, including: in the event that the signature information is determined to pass the validity check, auction transaction logic in the first smart contract is triggered based on the signature information and the purchase information. The above-mentioned triggering of the auction transaction logic according to the transaction request can be understood as that the information carried by the transaction request is transferred into the auction transaction logic in the first intelligent contract, so as to execute the flow corresponding to the auction transaction logic. The signature information is confirmed to pass the validity check, namely the signature information is not tampered by other people in the transmission process, namely the auction condition of the claimant carried by the signature information for the medal in the second intelligent contract is real and credible. Next, a method for determining that signature information passes validity verification by the block link points is described. Optionally, in some implementations, the signature information specifically includes: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by an auction party for the auction conditions by using a private key of an auction party; the blockchain node may also perform the following steps before triggering the auction transaction logic in the first smart contract based on the signature information and the purchase information: and calling auction transaction logic in the first intelligent contract, and carrying out validity check on the signature information by utilizing a public key disclosed by an auction party to determine that the signature information passes the validity check, wherein the private key and the public key are a pair of public and private key pairs. It will be appreciated that the public key blockchain node disclosed by the auctioneer is available. The private key of the auctioneer is owned by the auctioneer himself.
The auction transaction logic in the first smart contract includes: in the event that the price transferred to the first smart contract by the buyer is determined to satisfy the auction price indicated by the auction conditions of the auction party for the tokens in the target smart contract, the price transferred to the first smart contract by the buyer is transferred to the target smart contract, and the owner of the tokens indicated by the auction conditions of the auction party for the tokens in the target smart contract is modified to the buyer. Wherein the target smart contract comprises the second smart contract described above. Next, an implementation of executing S305 described above is described based on the auction trading logic in the first smart contract described above. Optionally, in some implementations, the blockchain node has recorded therein: a first contract account of a first smart contract, a second contract account of a second smart contract, an account of a claser that is a user of the blockchain node, and an account of a claser that is a user of the blockchain node, tokens in the second smart contract being recorded in the second contract account; the second contract account authorizes the first contract account to modify an owner of the tokens in the second contract account; the auction conditions include: auctioning the account of the claimant for the auction price of the tokens in the second contract account; the signature information specifically includes: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by an auction party for the auction information by using a private key of an auction party; the auction information includes an address of the second contract account and an identification of the token; the purchase information specifically includes: an account of the purchaser, a certain price paid by the account of the purchaser, and a first contract account. In the implementation manner, the account of the user of the blockchain node and the account of the intelligent contract deployed in the blockchain node are recorded in the blockchain node, and based on the account, the transfer operation can be realized between the user of the blockchain node and the intelligent contract in an account-based manner. Based on the implementation manner, when determining that signature information included in the transaction request passes the validity check, triggering auction transaction logic in the first intelligent contract according to the transaction request includes: determining a certain price paid by the account of the buyer to the first contract account, and matching the auction price corresponding to the auction conditions included in the signature information; paying a certain price to the first contract account from the account of the purchaser, transferring from the first contract account to the second contract account; the owner of the token in the second contract account recorded in the second contract account is modified to the account of the purchaser. In the above implementations, the triggering of the auction transaction logic in the first smart contract based on the transaction request is described taking as an example the auction conditions including the auction value of the token in the second contract account for the account of the auctioneer. Optionally, in other implementations, the auction condition specifically includes an auction price for the account of the auctioneer to auction the tokens in the second contract account for a preset time period; the auction information also includes a preset time period; before determining that the account of the buyer pays a certain price to the first contract account, the blockchain node may further perform the following steps before matching an auction price corresponding to the auction conditions indicated by the signature information: and determining that the current time does not exceed the preset time period. The preset time period is not particularly limited, and may be set according to the actual auction requirement of the auction party. In an embodiment of the application, the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract. That is, the first smart contract has the right to modify the owners of tokens in the second smart contract. Optionally, the blockchain node may further perform the following steps: receiving authorization information sent by an auction party, wherein the authorization information indicates that the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract; modifying the authorization information corresponding to the tokens in the second intelligent contract according to the authorization information to obtain modified authorization information, wherein the modified authorization information indicates that the second intelligent contract authorizes the first intelligent contract to modify owners of the tokens in the second intelligent contract.
In the present embodiment, the clapper and the purchaser are users of the blockchain node. Optionally, the blockchain node may further perform the following steps: receiving registration information sent by a target user, wherein the registration information is information of the target user registering with a block chain link point to become a user of the block chain node; and generating an account of the target user according to the registration information, wherein the target user is a buyer or a clapper. The manner in which the claimant and the purchaser send registration information to the blockchain node is referred to as the user of the blockchain node so that the claimant and the purchaser can invoke the intelligent contracts deployed in the blockchain link points.
In S301 to S305, the auction of tokens in the second smart contract by the first smart contract is described as an example. Optionally, in other implementations, the first smart contract may also perform an auction for tokens in the plurality of smart contracts; wherein the first smart contract performs the same principle of auctioning tokens in any one of the plurality of smart contracts as the first smart contract performs tokens in the second smart contract. In S301 to S305, the auction information corresponding to the auction conditions is described by taking as an example the auction price and the auction tokens. Optionally, auction information corresponding to the auction conditions may be set according to actual needs, for example, the auction information corresponding to the auction conditions may further include information of a purchaser, etc.
It should be understood that the above-described blockchain-based auction method shown in fig. 3 is merely illustrative and is not intended to limit the blockchain-based auction method provided herein in any way.
In the embodiment of the application, the transaction request of calling the first intelligent contract by the purchaser carries signature information of the seller and purchase information of the purchaser, wherein the signature information comprises auction conditions of the seller for the tokens in the second intelligent contract, and the purchase information comprises information that the purchaser pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract; and the second smart contract authorizes the first smart contract to modify an owner of the token in the second smart contract. Further, after receiving a transaction request which is sent by the buyer and calls the first intelligent contract, the block link point calls auction transaction logic in the first intelligent contract, and the auction transaction logic is triggered according to the transaction request. In the above implementation, the auction condition of the auctioneer for the tokens in the second smart contract is carried by the transaction request of the buyer invoking the first smart contract, in other words, the auction condition of the auctioneer for the tokens in the second smart contract is not set in the first smart contract; and the transaction request of the buyer invoking the first intelligent contract is determined according to the signature information of the auction party sent by the auction party. Based on this arrangement, when the auctioneer needs to change the auction conditions for tokens in the second smart contract, only the purchaser needs to generate a new transaction request based on the modified auction conditions; and triggering auction transaction logic in the first intelligent contract with the new transaction request to achieve the corresponding auction. This implementation eliminates the need to redeploy new first intelligent contracts corresponding to modified auction conditions in the blockchain node. In addition, the first smart contract described above may also be used to auction tokens in multiple smart contracts. In summary, the method may increase the flexibility of the blockchain-based auction method.
Next, another auction method based on a blockchain provided in an embodiment of the present application is described with reference to fig. 4. It will be appreciated that the blockchain-based auction method described in fig. 4 is one specific example of the blockchain-based auction method described in fig. 3 above. Specifically, FIG. 4 is an illustration of the auction contract depicted in FIG. 3 in association with an NFT smart contract in a blockchain. The execution body depicted in fig. 4 includes a claser, a blockchain, and a purchaser 1.
Fig. 4 is a schematic diagram of another blockchain-based auction method provided in an embodiment of the present application. It should be appreciated that the example of fig. 4 is merely to aid one skilled in the art in understanding the present embodiments, and is not intended to limit the present embodiments to the specific values or particular scenarios illustrated. Various equivalent modifications and variations will be apparent to those skilled in the art from the example of fig. 4 given below, and such modifications and variations are intended to be within the scope of the embodiments of the present application. As shown in fig. 4, the blockchain-based auction method includes S401 to S408. Next, S401 to S408 are described in detail.
S401, the auction party creates NFT intelligent contracts A and auction contracts X in the blockchain.
NFT smart contract a and auction contract X are two different smart contracts deployed on the blockchain, which differ in contract address and also differ in purpose. Where NFT smart contract a is a smart contract (also referred to as NFT1 token contract) that includes NFT1, NFT1 may be, but is not limited to, tokens issued using the ERC-721 standard/protocol. The contract account #1 of the NFT smart contract a includes a contract code in which owner information 1 of the NFT1, a tokenId of the NFT1, and authorization information 1 of the NFT1 are recorded. Specifically, owner information 1 of NFT1 indicates that the owner of NFT1 is auctioneer 1; the authorization information 1 for NFT1 indicates that the auction contract X is given by the seller the right to modify the owner of NFT1, i.e., the auction contract X has the right to modify the owner of NFT 1. The auction contract X is used for auctioning the NFT1 in the NFT smart contract a according to the auction intention of the auctioneer, and transferring the auction amount obtained after auctioning the NFT1 to the auction seller that originally holds the NFT 1. The contract account #2 of the auction contract X includes a contract code for implementing the function of the auction contract X described above. In this manner, auction contract X is associated with an NFT Smart contract A. Alternatively, in other implementations, auction contract X may be associated with other intelligent contracts other than NFT intelligent contract a. For example, other smart contracts may include NFT smart contract B, where NFT smart contract B is a smart contract that includes NFT2 (also known as an NFT2 token contract). In this manner, the modification rights of the owner of NFT2 associated with this NFT smart contract B may be given to auction contract X, i.e., auction contract X also has the following effects: for auctioning NFT2 in NFT smart contract B according to the auctioneer's auction intention, and transferring the auction amount obtained after auctioning NFT2 to the seller that originally holds NFT 2. After the intelligent contract is deployed on the blockchain, a corresponding public-private key pair may be allocated to a contract account corresponding to the intelligent contract. That is, the manager corresponding to the contract account can hold the public-private key pair, wherein the private key can be used for digital signature processing on the transaction initiated by the manager, and the public key can be used for signature verification. The public key may be broadcast in the blockchain.
The implementation of the auction party in creating NFT smart contract a described above in the blockchain is not particularly limited. Illustratively, the clapper creating NFT smart contract a in the blockchain may include the steps of: the auction registers to the blockchain to obtain a public key and a private key which are distributed to the claser by the blockchain, wherein the public key of the claser is used as an account address of the claser on the blockchain, and the private key is used as a unique key for operating an account of the claser; the claimant sends a transaction for creating the NFT intelligent contract A to the blockchain, wherein the transaction of the NFT intelligent contract A comprises an address of the claimant, a contract code of the intelligent contract A and a digital signature 1, the contract code of the NFT intelligent contract A is used for casting the NFT1, and the digital signature 1 is a result obtained by performing digital signature processing on the NFT intelligent contract A by using the private key through an auction Fang Li; after each node included in the blockchain receives a transaction for creating the NFT smart contract a, the nodes successfully create the NFT smart contract a in the blockchain after agreeing through a consensus mechanism. After the NFT smart contract a is created, a contract account #1 corresponding to the NFT smart contract a is recorded in each node included in the blockchain, and the contract account #1 has a specific address, and the contract code of the NFT smart contract a is stored in the contract account # 1. Wherein, contract account #1 also includes the account balance of NFT smart contract a. The behavior of NFT smart contract a is controlled by the corresponding contract code. In other words, NFT smart contract a causes a virtual account to be generated on the blockchain that includes contract code and account Storage (Storage).
The implementation of creating the auction contract X described above in the blockchain by the auctioneer is not particularly limited. Illustratively, the auction contract X is deployed by the auction seller in the blockchain, which may include the steps of: the auction registers to the blockchain to obtain a public key and a private key which are distributed to the claser by the blockchain, wherein the public key of the claser is used as an account address of the claser on the blockchain, and the private key is used as a unique key for operating an account of the claser; the auction seller sends a transaction for creating an auction contract X to the blockchain, wherein the transaction of the auction contract X comprises an address of the auction seller, a contract code of the auction contract X and a digital signature 2, the contract code of the auction contract X is used for realizing the auction contract X, and the digital signature 2 is a result obtained by performing digital signature processing on the auction contract X by using the private key by an auction Fang Li; each node included in the blockchain successfully creates the auction contract X in the blockchain after receiving the transaction for creating the auction contract X and the nodes agree through a consensus mechanism. After the auction contract X is created, each node included in the blockchain records a contract account #2 corresponding to the auction contract X, where the contract account #2 has a specific address, and the address of the contract account #2 is different from the address of the contract account # 1. Wherein contract account #2 also includes the account balance of auction contract X.
In the embodiment of the present application, the above-mentioned blockchain includes each node that also records an external account, that is, an account #1 of the claser and an account #2 of the buyer 1. And at least recording a mapping between the address of any one account and account content corresponding to the any one account in any one account, wherein the account content at least can comprise account balance.
In this embodiment of the present application, the blockchain includes at least two nodes, and the number of nodes included in the blockchain may be set according to actual needs, which is not limited in particular. For example, the blockchain described in S401 above may be the blockchain 130 shown in fig. 1 above. The type of blockchain is not particularly limited. For example, the blockchain may be a public chain or a federated chain, etc.
S402, the auctioneer generates signature information 1 and sends the signature information 1 to the buyer 1, wherein the signature information 1 indicates that the auctioneer auctes that the NFT smart contract a includes an auction price of 1 ethernet for NFT1 within the first preset time period. Accordingly, the purchaser 1 receives signature information 1 from the seller.
The signature information 1 is used for indicating that an auctioneer auctes an NFT1 included in the NFT smart contract a for a first preset time period to auction a price of 1 ethernet. That is, the signature information 1 functions to indicate an auction intention of an auction by an auction seller for the NFT1. Wherein, the signature information 1 at least can include: data 1 to be signed, and a digital signature 1 obtained after signing the data 1 to be signed. The data to be signed 1 comprises at least: the auction price for NFT1 (i.e., 1 ethernet), the auction expiration time (i.e., the first preset time period), the contract address for NFT smart contract a, and the token Id for NFT1, the token Id for NFT1 being used to identify NFT1. The first preset time period may be set according to the requirement of the clapper, which is not limited in particular. For example, the first preset time period may be 2022, 11, month 1 to 2022, 11, month 3, the auction price of auction NFT1 is 1 ethernet mill, in which way, signature information 1 is specifically used to indicate that the auction price of NFT1 included in auction NFT smart contract a is 1 ethernet mill for the time period 2022, 11, month 1 to 2022, 11, month 3.
The manner in which the auction parties generate the signature information 1 is not particularly limited. In some implementations, the auctioneer generates the signature information 1 described above, including: the auctioneer carries out hash processing on the data 1 to be signed to obtain the abstract of the data 1 to be signed; the auctioneer encrypts the abstract of the data 1 to be signed by using the private key of the auctioneer and adopting an asymmetric encryption algorithm to obtain a digital signature 1; the clapper packages the data 1 to be signed and the digital signature 1 to generate signature information 1.
The implementation of the auctioneer's sending of the signature information 1 to the buyer 1 is not particularly limited. Illustratively, in the schematic shown in fig. 4, it is described that the auctioneer directly sends the generated signature information 1 to the buyer. Optionally, after the auction party generates the signature information 1, the auction party may also issue the signature information to the network platform or the APP; thereafter, the purchaser 1 obtains the signature information 1 from the network platform or application APP.
It should be noted that, the signature information 1 includes a first preset period, and the signature information 1 is in a disabled state when the current time has exceeded the first preset period. For example, the first preset period of time associated with the signature information 1 is 2022 year 11 month 1 to 2022 year 11 month 3, and the current period of time is 2022 year 11 month 4, in which case the signature information 1 may be considered to be already in a disabled state. In the embodiment of the present application, the clapper may also generate updated signature information 1 and send the updated signature information 1 to the buyer 1 when the signature information 1 fails. The updated signature information 1 is used for indicating an auction price of the auctioneer to auction the NFT1 in a second preset time period, wherein the second preset time period is different from the first preset time period, and the current time does not exceed the second preset time period. Illustratively, S408 shown in fig. 4 describes the above-described step of transmitting updated signature information 1.
Hereinafter, description will be made taking an example in which the current time does not exceed the first preset time period, that is, the direct execution of S403 after the execution of S402 is described taking an example.
S403, the buyer 1 generates a call request for requesting to call the auction contract X in the blockchain to execute the bidding step, based on the signature information 1.
In an embodiment of the present application, the call request may at least include: the account address of buyer 1, the contract address of NFT smart contract a, 1 ethernet for which buyer 1 is transferred to auction contract X, and signature information 1. Buyer 1 transfers to 1 ethernet of auction contract X, i.e., buyer 1 transfers 1 ethernet of account #1 to contract account #2 of auction contract X.
Wherein, the buyer 1 generates a call request according to the signature information 1, comprising: the purchaser 1 analyzes the signature information 1 to obtain signature data 1 and data to be signed 1; the buyer 1 decrypts the signature data 1 by using the public key disclosed by the auction party to obtain the abstract of the signature data 1; the purchaser 1 carries out hash processing on the data 1 to be signed to obtain a digest of the data 1 to be signed; the purchaser 1 compares the abstract of the signature data 1 with the abstract of the data 1 to be signed in consistency, and determines that the abstract of the signature data 1 is identical with the abstract of the data 1 to be signed; the purchaser 1 determines the requirement of purchasing the NFT1 associated with the data 1 to be signed according to the data 1 to be signed; the buyer 1 generates a call request based on the account address of the buyer 1, the contract address of the NFT smart contract a, the price 1 ethernet for which the buyer is to transfer to the auction contract X, and the signature information 1. It will be appreciated that the flow of the purchaser 1 performing the above-described correspondence comparison is for the purchaser 1 to confirm whether the signature information 1 has been tampered with during transmission, and for the identity of the sender transmitting the signature information 1. In the case that the signature information 1 passes the correspondence comparison, the purchaser 1 can confirm that the signature information 1 has not been tampered with in the transmission process, i.e., the signature information 1 is trusted data.
It will be appreciated that after executing S403 described above, the account balance recorded in the buyer' S1 account #2 will be reduced by 1 ethernet, and the account balance recorded in the auction contract X contract account #2 will be increased by 1 ethernet. That is, after executing S403 described above, the buyer 1 transfers the price to be paid for the purchase of NFT1 from account #1 of the buyer 1 to contract account #2 of auction contract X.
S404, the purchaser 1 sends a call request to the blockchain. Accordingly, the block link receives the call request from the purchaser 1.
After the buyer 1 executes S404, each node included in the blockchain receives the call request sent by the buyer 1.
S405, the blockchain invokes the auction contract X to verify the invoking request, and determines whether the invoking request passes the verification.
The execution subject in S405 described above executes auction contract X for the blockchain, i.e., the EVM of each node included in the blockchain. The auction contract X verifies the call request, and determines whether the call request passes the verification, including: the auction contract X analyzes the call request, and the call request is obtained at least by the following steps: the account address of the buyer 1, the contract address of the NFT smart contract a, 1 ethernet workshops to which the buyer is to transfer to the auction contract X, and signature information 1; the auction contract X analyzes the signature information 1 by utilizing the corresponding public key to obtain a abstract 2; and comparing the digest 2 with the digest of the data 1 to be signed; if digest 2 and digest 1 are equal, the signer representing signature information 1 is auction contract X; auction contract X determines that the auction price of NFT1 matches the price that the buyer transferred to auction contract X; and determining that the call request passes the verification under the condition that the current time does not exceed the auction expiration time.
The verification process of S405 is performed, that is, in the case where the signer of the signature information 1 included in the verification call request is the auction contract X, the price of the purchase NFT1 paid to the auction contract X by the buyer 1 is the auction price specified by the auctioneer through the signature information 1, and the current time does not exceed the auction period indicated by the signature information 1, the call request passes the verification.
In the embodiment of the present application, in the case where the auction contract X determines that the call request passes the verification, S406 is continued after S405 described above is executed; alternatively, in the case where the auction contract X determines that the call request is not authenticated, S407 is continued after S405 described above is performed.
S406, the blockchain invokes the auction contract X to modify the owner information 2 of the owner information 1 of the NFT1 recorded in the NFT intelligent contract A; and transferring 1 ethernet in contract account #2 of auction contract X to auction party's account #1; owner information 2 indicates that the owner of NFT1 is buyer 1.
The execution subject in S406 described above executes auction contract X for the blockchain, i.e., the EVM of each node included in the blockchain.
Executing S406 above, auction contract X in the blockchain modifies owner information 2 with owner information 1 of NFT1 recorded in NFT smart contract a, including: auction contract X in the blockchain obtains owner information 1 of NFT1 recorded in NFT intelligent contract A according to contract address of NFT intelligent contract A included in the call request; auction contract X in the blockchain modifies owner information 2 with owner information 1 of NFT1 recorded in NFT smart contract a.
It will be appreciated that auction contract X transfers 1 ethernet in contract account #2 of auction contract X to auction party's account #1, and after this operation is performed, the account balance recorded in contract account #2 of auction contract X will decrease by 1 ethernet and the account balance recorded in auction party's account #1 will increase by 1 ethernet. That is, after the execution of S406 described above, the transaction requested by the call request is successfully completed.
S407, the auction contract X in the blockchain ends the request corresponding to the call request.
After S405, S407 is continued, and if the auction contract X determines that the signature information 1 included in the call request does not pass the signature verification, the auction requested by the call request is ended.
It should be understood that the above-described blockchain-based auction method depicted in fig. 4 is merely illustrative and is not intended to limit the blockchain-based auction method provided by embodiments of the present application in any way. For example, in other implementations, the auction contract X described above may also be associated with a greater number of NFT intelligence contracts, i.e., the one auction contract X is used to auction at least one NFT included in the associated greater number of NFT intelligence contracts based on the auction principles described above with respect to fig. 4.
In an embodiment of the present application, the above-described blockchain-based auction method involves a seller, a blockchain, and a buyer 1. At least two intelligent contracts, namely an NFT intelligent contract A and an auction contract X, are deployed in the blockchain. The auction seller grants the auction contract X the modification rights of the owner of NFT1 included in NFT smart contract a. The auctioneer's auction intention of the auctioneer's auction for NFT1 is represented by issuing signature information 1, i.e., signature information 1 is used to indicate the auctioneer's auction intention (e.g., auction price, auction time, etc.) of auctioning NFT 1. After acquiring the signature information 1, the buyer 1 may generate a call request for calling the auction contract X, and send the call request to the auction contract X. Wherein the call request includes: the account address of buyer 1, the contract address of NFT smart contract a, 1 ethernet for which buyer 1 is transferred to auction contract X, and signature information 1. After receiving the call request sent by the buyer 1, the auction contract X verifies the call request, and in the case that the call request passes verification, the auction contract X can modify the owner holding the NFT1 to the buyer 1 and transfer the price of the purchase NFT1 paid by the buyer 1 to the seller. Modifications are made. Wherein the auctioneer knows the auction intention (e.g., auction price or auction quantity, etc.) of the auction of NFT1 by the auctioneer within a preset time period by sending signature information to the buyer so that the buyer receiving the signature information can learn of the auction intention. If the auction time indicated by the signature information 1 has elapsed before the buyer invokes the auction contract X, the auctioneer may reissue the updated signature information, and the current time does not exceed the auction time indicated by the updated signature information. In this way, the purchaser 1 may generate a call request corresponding to the updated signature information to call the auction contract X to perform the bidding step. In the above-described blockchain-based auction method, the auction intention of the auction party is carried by the call request for the buyer to call the auction contract X, and when the auction party needs to modify the auction intention, it is unnecessary to newly deploy a new auction contract on the blockchain, and only the signature information 1 corresponding to the auction intention needs to be newly transmitted to the buyer 1. Furthermore, auction contract X described above may also be used to auction NFTs in other NFT smart contracts besides NFT smart contract a. For example, the auction contract X described above may also be used to auction NFT2 in NFT smart contract B in such a way that only the modification rights of the owners of NFT2 in NFT smart contract B need be transferred to auction contract X, and the auctioneer publishes signature information corresponding to auction NFT2 to the buyer, which signature information is used to indicate the auctioneer's intent to auction NFT2 (e.g., auction time, auction price, etc.), in such a way that the auction contract corresponding to the auctioneer's intent to auction NFT2 does not need to be redeployed on the blockchain. In summary, the auction method based on the blockchain has higher flexibility.
In the above, an application scenario and a blockchain-based auction method applicable to the blockchain-based auction method provided by the present application are described in detail with reference to fig. 1 to 4. Next, the blockchain-based auction apparatus, the blockchain-based auction system, and the electronic device provided in the present application are described with reference to fig. 5 to 7. It should be appreciated that the above blockchain-based auction method corresponds to the blockchain-based auction apparatus, system, and electronic device below. Details not described in detail below can be found in the relevant description of the method embodiments described above.
Fig. 5 is a schematic structural diagram of an auction apparatus based on blockchain according to an embodiment of the present application. As shown in fig. 5, the apparatus comprises a transceiving unit 501 and a processing unit 502,
in a first implementation manner, the method comprises the steps of,
in one implementation, the blockchain-based auction device shown in fig. 5 is applied to blockchain nodes. In the following, the functioning of the transceiving unit 501 and the functioning of the processing unit 502 are described in this implementation.
The transceiver unit 501 is configured to: receiving a transaction request sent by a buyer and calling the first intelligent contract, wherein the transaction request comprises signature information of a claimant and purchase information of the buyer, the signature information comprises auction conditions of the claimant for tokens in the second intelligent contract, and the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract; the processing unit 502 is configured to: invoking auction transaction logic in the first intelligent contract, and triggering the auction transaction logic according to the transaction request, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
In the second implementation manner, the first implementation manner,
in a second implementation, the blockchain-based auction device shown in fig. 5 is applied to a seller. In the following, the functioning of the transceiving unit 501 and the functioning of the processing unit 502 are described in this implementation.
The processing unit 502 is configured to: generating signature information of an auctioneer according to auction conditions of the auctioneer for tokens in a second smart contract, wherein the second smart contract is deployed in a blockchain node, and the signature information comprises auction conditions of the auctioneer for tokens in the second smart contract; the transceiver unit 501 is configured to: sending signature information of the auction party, so that a buyer sends a transaction request for calling a first intelligent contract to the blockchain node according to the purchase information of the buyer and the acquired signature information of the auction party to call auction transaction logic in the first intelligent contract; wherein the purchase information includes information that the purchaser pays a price to the first smart contract to purchase tokens in the second smart contract; the auction transaction logic includes at least: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract; the first smart contract is deployed in the blockchain node.
In a third implementation manner, the method comprises the steps of,
in a third implementation, the blockchain-based auction device shown in fig. 5 is applied to a buyer. In the following, the functioning of the transceiving unit 501 and the functioning of the processing unit 502 are described in this implementation.
The transceiver unit 501 is configured to: acquiring signature information of an auctioneer, wherein the signature information comprises auction conditions of the auctioneer for tokens in the second smart contract; the processing unit 502 is configured to: generating a transaction request for calling a first intelligent contract according to the purchase information of the buyer and the signature information, wherein the transaction request comprises the purchase information of the buyer and the signature information of the auctioneer, the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract, and the first intelligent contract and the second intelligent contract are deployed in a blockchain node; the transceiver unit 501 is configured to: sending the transaction request for calling the first intelligent contract to the blockchain node to trigger auction transaction logic in the first intelligent contract, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
Fig. 6 is a schematic structural diagram of a blockchain-based auction system according to an embodiment of the present application. As shown in fig. 6, the system includes a clapper 601, a blockchain node 602, and a buyer 603, wherein the blockchain node 602 is any one of the blockchains.
Wherein the auction party 601 performs the steps performed by the auction party in the blockchain-based auction method described above, the blockchain node 602 performs the steps performed by the blockchain node in the blockchain-based auction method described above, and the buyer 603 performs the steps performed by the buyer in the blockchain-based auction method described above, which are not described in detail herein.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 7, includes a memory 701, a processor 702, a communication interface 703, and a communication bus 704. The memory 701, the processor 702 and the communication interface 703 are in communication connection with each other through a communication bus 704.
The memory 701 may be a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access memory (random access memory, RAM). The memory 701 may store a program, and when the program stored in the memory 701 is executed by the processor 702, the processor 702 and the communication interface 703 are used to perform the steps of the blockchain-based auction method of the embodiment of the present application.
The processor 702 may employ a general-purpose central processing unit (central processing unit, CPU), microprocessor, application specific integrated circuit (application specific integrated circuit, ASIC), graphics processor (graphics processing unit, GPU) or one or more integrated circuits for executing associated programs to perform the functions required to be performed by the elements in the smart contract-based auction apparatus of the present embodiments or to perform the various steps of the blockchain-based auction method of the present embodiments.
The processor 702 may also be an integrated circuit chip with signal processing capabilities. In implementation, various steps of the blockchain-based auction method provided herein may be accomplished through hardware integrated logic circuitry in the processor 702 or instructions in the form of software. The processor 702 may also be a general purpose processor, a digital signal processor (digital signal processing, DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 701, and the processor 702 reads information in the memory 701, and in combination with hardware thereof, performs functions required to be performed by units included in the blockchain-based auction device of the method embodiment of the present application, or performs the blockchain-based auction method of the method embodiment of the present application.
The communication interface 703 enables communication between the device shown in fig. 7 and other devices or communication networks using transceiving means such as, but not limited to, a transceiver.
Communication bus 704 may include a path to transfer information between various components of the device shown in fig. 7 (e.g., memory 701, processor 702, communication interface 703).
The embodiment of the application provides a computer readable storage medium, which comprises computer instructions, wherein the computer instructions are used for realizing any technical scheme of the auction method based on the blockchain when being executed by a processor.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the disclosed embodiments of the present application may be embodied in the form of a software product, which may be stored on a computer readable medium, comprising several instructions to cause a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the disclosed embodiments of the present application.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media, or any other non-transmission media, that can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
While the preferred embodiment has been described, it is not intended to limit the invention thereto, and any person skilled in the art may make variations and modifications without departing from the spirit and scope of the present invention, so that the scope of the present invention shall be defined by the claims of the present application.

Claims (32)

1. A blockchain-based auction method applied to blockchain nodes including deployment of a first smart contract and a second smart contract, the method comprising:
receiving a transaction request sent by a buyer and calling the first intelligent contract, wherein the transaction request comprises signature information of a claimant and purchase information of the buyer, the signature information comprises auction conditions of the claimant for tokens in the second intelligent contract, and the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract;
Invoking auction transaction logic in the first intelligent contract, and triggering the auction transaction logic according to the transaction request, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
2. The method of claim 1, wherein the invoking the auction transaction logic in the first smart contract and triggering the auction transaction logic in accordance with the transaction request comprises:
and triggering auction transaction logic in the first intelligent contract according to the signature information and the purchase information under the condition that the signature information passes the validity check.
3. The method according to claim 2, characterized in that the signature information comprises in particular: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by the auctioneer for the auction conditions using a private key of the auctioneer;
before said triggering auction transaction logic in said first smart contract based on said signature information and said purchase information, said method further comprises:
Invoking the auction transaction logic in the first intelligent contract, and performing validity check on the signature information by utilizing a public key disclosed by the auction party, so as to determine that the signature information passes the validity check, wherein the private key and the public key are a pair of public and private key pairs.
4. A method according to any one of claims 1 to 3, wherein the blockchain node has recorded therein: a first contract account of the first smart contract, a second contract account of the second smart contract, an account of the clapper that is a user of the blockchain node, and an account of the clapper that is a user of the blockchain node, tokens in the second smart contract being recorded in the second contract account; the second contract account authorizes the first contract account to modify an owner of a token in the second contract account;
the auction conditions include: the account of the auctioneer auctioning the auction price of the tokens in the second contract account;
the signature information specifically comprises: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by the auctioneer for the auction information using a private key of the auctioneer; the auction information includes an address of the second contract account and an identification of the token;
The purchase information specifically includes: the account of the purchaser, the certain price paid by the account of the purchaser, and the first contract account.
5. The method of claim 4, wherein the triggering auction transaction logic in the first smart contract in accordance with the transaction request if it is determined that the signature information included in the transaction request passes a validity check comprises:
determining the certain price paid by the buyer's account to the first contract account, matching an auction price corresponding to the auction conditions included in the signature information;
paying the purchaser's account for the certain price to the first contract account, transferring from the first contract account to the second contract account;
modifying an owner of the token in the second contract account recorded in the second contract account to an account of the purchaser.
6. The method of claim 5, wherein the auction conditions specifically include an auction price for the auctioneer's account to auction tokens in the second contracted account for a preset period of time; the auction information also includes the preset time period;
Before the determining that the certain price paid by the buyer's account to the first contract account matches an auction price corresponding to the auction conditions indicated by the signature information, the method further comprises:
and determining that the current time does not exceed the preset time period.
7. The method of any one of claims 1 to 6, further comprising:
receiving authorization information sent by the auctioneer, wherein the authorization information indicates that the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract;
modifying the authorization information corresponding to the tokens in the second intelligent contract according to the authorization information to obtain modified authorization information, wherein the modified authorization information indicates that the second intelligent contract authorizes the first intelligent contract to modify owners of the tokens in the second intelligent contract.
8. The method of any one of claims 1 to 7, further comprising:
receiving registration information sent by a target user, wherein the registration information is information that the target user registers with the blockchain node to become a user of the blockchain node;
And generating an account of the target user according to the registration information, wherein the target user is the buyer or the clapper.
9. The method according to claim 1 to 8,
the auctioneer is the owner of the tokens in the second smart contract; or alternatively, the process may be performed,
the auctioneer is an auction service that brokers auctions for all of the tokens in the second smart contract.
10. The method of any one of claims 1 to 9, the token being a non-homogenous token NFT.
11. An intelligent contract-based auction method, applied to a auction party, comprising:
generating signature information of the auction party according to auction conditions of the auction party for the tokens in a second intelligent contract, wherein the second intelligent contract is deployed in a blockchain node, and the signature information comprises auction conditions of the auction party for the tokens in the second intelligent contract;
sending signature information of the auction party, so that a buyer sends a transaction request for calling a first intelligent contract to the blockchain node according to the purchase information of the buyer and the acquired signature information of the auction party to call auction transaction logic in the first intelligent contract; wherein the purchase information includes information that the purchaser pays a price to the first smart contract to purchase tokens in the second smart contract; the auction transaction logic includes at least: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract; the first smart contract is deployed in the blockchain node.
12. The method of claim 11, wherein the blockchain node has recorded therein: a first contract account of the first smart contract, a second contract account of the second smart contract, an account of the clapper that is a user of the blockchain node, and an account of the clapper that is a user of the blockchain node, tokens in the second smart contract being recorded in the second contract account; the second contract account authorizes the first contract account to modify an owner of a token in the second contract account;
the auction conditions include: the account of the auctioneer auctioning the auction price of the tokens in the second contract account;
the signature information specifically comprises: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by the auctioneer for the auction information using a private key of the auctioneer; the auction information includes an address of the second contract account and an identification of the token;
the purchase information specifically includes: the account of the purchaser, the certain price paid by the account of the purchaser, and the first contract account.
13. The method of claim 12, wherein the step of determining the position of the probe is performed,
the auction conditions specifically include auction prices for the auctioneer's account to auction tokens in the second contract account for a preset time period; the auction information also includes the preset time period.
14. The method of any of claims 11 to 13, wherein the transmitting signature information of the auctioneer comprises:
transmitting the signature information to the purchaser; or alternatively, the process may be performed,
and sending the signature information to a third party platform so that the purchaser can acquire the signature information by accessing the third party platform.
15. The method according to any one of claims 11 to 14, further comprising:
and sending authorization information to the blockchain node, wherein the authorization information indicates that the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
16. The method according to any one of claims 11 to 15, further comprising:
and sending a transaction for creating the first intelligent contract to a blockchain node to successfully deploy the first intelligent contract in the blockchain node, wherein the transaction for creating the first intelligent contract comprises address information of the auctioneer and a contract code corresponding to the first intelligent contract.
17. The method according to any one of claims 11 to 16, wherein,
the auctioneer is an auction service that brokers auctions for all of the tokens in the second smart contract; or alternatively, the process may be performed,
the auctioneer is the owner of a token in the second smart contract, the method further comprising:
a transaction is sent to a blockchain link to create the second smart contract to successfully deploy the second smart contract in the blockchain node.
18. The method according to any one of claims 11 to 17, further comprising:
and sending registration information to the blockchain node, wherein the registration information is information which is registered by the auction to the blockchain node to become a user of the blockchain node.
19. The method of any one of claims 11 to 18, the token being a non-homogenous token NFT.
20. An intelligent contract-based auction method, applied to a buyer, comprising:
acquiring signature information of a clapper, wherein the signature information comprises auction conditions of the clapper for tokens in the second intelligent contract;
Generating a transaction request for calling a first intelligent contract according to the purchase information of the buyer and the signature information, wherein the transaction request comprises the purchase information of the buyer and the signature information of the auctioneer, the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract, and the first intelligent contract and the second intelligent contract are deployed in a blockchain node;
sending the transaction request for calling the first intelligent contract to the blockchain node to trigger auction transaction logic in the first intelligent contract, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
21. The method according to claim 20, wherein the signature information specifically comprises: the auction conditions and signature data corresponding to the auction conditions, wherein the signature data is generated by the auction party for the auction conditions by using a private key of the auction party;
Before the generating a transaction request invoking the first smart contract based on the purchase information and the signature information, the method further comprises:
verifying the validity of the signature information according to the public key disclosed by the auction party, wherein the private key of the auction party and the public key disclosed by the auction party are a pair of public-private key pairs;
and generating the purchase information according to the auction information corresponding to the auction conditions under the condition that the signature information passes the validity verification.
22. The method of claim 20 or 21, wherein the blockchain node has recorded therein: a first contract account of the first smart contract, a second contract account of the second smart contract, an account of the clapper that is a user of the blockchain node, and an account of the clapper that is a user of the blockchain node, tokens in the second smart contract being recorded in the second contract account; the second contract account authorizes the first contract account to modify an owner of a token in the second contract account;
the auction conditions include: the account of the auctioneer auctioning the auction price of the tokens in the second contract account;
The signature information specifically comprises: auction information corresponding to the auction conditions and signature data corresponding to the auction information, wherein the signature data is generated by the auctioneer for the auction information using a private key of the auctioneer; the auction information includes an address of the second contract account and an identification of the token;
the purchase information specifically includes: the account of the purchaser, the account of the purchaser paying the certain price, and the first contract account.
23. The method of claim 22, wherein the step of determining the position of the probe is performed,
the auction conditions specifically include auction prices for the auctioneer's account to auction tokens in the second contract account for a preset time period; the auction information also includes the preset time period.
24. The method of any one of claims 20 to 23, wherein the obtaining signature information of the clapper includes:
receiving the signature information sent by the auction party; or alternatively, the process may be performed,
and acquiring the signature information from a third party platform, wherein the signature information of the clapper is stored in the third party platform.
25. The method according to any one of claims 20 to 24, further comprising:
And sending registration information to the blockchain node, wherein the registration information is information that the purchasing party registers to the blockchain node to become a user of the blockchain node.
26. The method according to any one of claim 20 to 25,
the auctioneer is the owner of the tokens in the second smart contract; or alternatively, the process may be performed,
the auctioneer is an auction service that brokers auctions for all of the tokens in the second smart contract.
27. The method of any one of claims 20 to 26, the token being a non-homogenous token NFT.
28. An auction apparatus based on smart contracts, for use with a blockchain node including deployment of a first smart contract and a second smart contract, the apparatus comprising:
the receiving and transmitting unit is used for: receiving a transaction request sent by a buyer and calling the first intelligent contract, wherein the transaction request comprises signature information of a claimant and purchase information of the buyer, the signature information comprises auction conditions of the claimant for tokens in the second intelligent contract, and the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract;
The processing unit is used for: invoking auction transaction logic in the first intelligent contract, and triggering the auction transaction logic according to the transaction request, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
29. An intelligent contract-based auction apparatus for use with a auctioneer, the apparatus comprising:
the processing unit is used for: generating signature information of the auction party according to auction conditions of the auction party for the tokens in a second intelligent contract, wherein the second intelligent contract is deployed in a blockchain node, and the signature information comprises auction conditions of the auction party for the tokens in the second intelligent contract;
the receiving and transmitting unit is used for: sending signature information of the auction party, so that a buyer sends a transaction request for calling a first intelligent contract to the blockchain node according to the purchase information of the buyer and the acquired signature information of the auction party to call auction transaction logic in the first intelligent contract; wherein the purchase information includes information that the purchaser pays a price to the first smart contract to purchase tokens in the second smart contract; the auction transaction logic includes at least: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract; the first smart contract is deployed in the blockchain node.
30. An intelligent contract-based auction apparatus for use with a buyer, said apparatus comprising:
the receiving and transmitting unit is used for: acquiring signature information of a clapper, wherein the signature information comprises auction conditions of the clapper for tokens in the second intelligent contract;
the processing unit is used for: generating a transaction request for calling a first intelligent contract according to the purchase information of the buyer and the signature information, wherein the transaction request comprises the purchase information of the buyer and the signature information of the auctioneer, the purchase information comprises information that the buyer pays a certain price to the first intelligent contract to purchase the tokens in the second intelligent contract, and the first intelligent contract and the second intelligent contract are deployed in a blockchain node;
the transceiver unit is further configured to: sending the transaction request for calling the first intelligent contract to the blockchain node to trigger auction transaction logic in the first intelligent contract, wherein the auction transaction logic at least comprises: auctioning tokens in the second smart contract according to the auction conditions; and the second smart contract authorizes the first smart contract to modify an owner of a token in the second smart contract.
31. An electronic device, comprising: a memory and a processor, the memory and the processor coupled;
the memory is used for storing one or more computer instructions;
the processor being configured to execute the one or more computer instructions to implement the method of any one of claims 1 to 27.
32. A computer readable storage medium having stored thereon one or more computer instructions executable by a processor to implement the method of any of claims 1 to 27.
CN202211627229.9A 2022-12-16 2022-12-16 Auction method and device based on blockchain and electronic equipment Pending CN116012121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211627229.9A CN116012121A (en) 2022-12-16 2022-12-16 Auction method and device based on blockchain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211627229.9A CN116012121A (en) 2022-12-16 2022-12-16 Auction method and device based on blockchain and electronic equipment

Publications (1)

Publication Number Publication Date
CN116012121A true CN116012121A (en) 2023-04-25

Family

ID=86037258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211627229.9A Pending CN116012121A (en) 2022-12-16 2022-12-16 Auction method and device based on blockchain and electronic equipment

Country Status (1)

Country Link
CN (1) CN116012121A (en)

Similar Documents

Publication Publication Date Title
CN110457875B (en) Data authorization method and device based on block chain
JP7450339B2 (en) Systems, methods, and computer programs for resource fairness for blockchain
CN110163590B (en) Payment withholding method and device based on block chain, electronic equipment and storage medium
TWI716140B (en) Data processing method and device based on blockchain
JP7128111B2 (en) Systems and methods for controlling asset-related activities via blockchain
CN109154885B (en) Business process execution on a blockchain platform
WO2020220761A1 (en) Method and device for signing payment deduction agreement employing blockchain, and electronic apparatus.
CN111026789B (en) Block chain-based electronic bill query method and device and electronic equipment
CN112020705A (en) Block chain random timer transaction synchronization
US11615078B2 (en) Blockchain-based transaction methods
US11443307B2 (en) Cross-border resource transfer authenticity verification method, device and electronic equipment
CN111309745B (en) Virtual resource processing method and device, electronic equipment and storage medium
CN110738566A (en) asset screening method and device based on block chain and electronic equipment
CN112767163B (en) Block chain-based digital commodity transaction method and device
TW201935299A (en) Blockchain system, node server and method for processing strategy model scripts of financial assets
CN111241557B (en) Service request method and device based on block chain
CN111127021B (en) Service request method and device based on block chain
CN112766854B (en) Block chain-based digital commodity transaction method and device
CN112883109B (en) Block chain-based digital commodity transaction method and device
TW202016819A (en) Block-chain transaction method and device and electronic device
CN111414434B (en) Block chain-based data transaction management network, transaction device and storage medium
US20210319456A1 (en) Methods, apparatuses, devices, and systems for generating customs clearance confirmation information
CN112561407B (en) Asset management method, system and device based on block chain
CN111402033A (en) Asset information management method and device based on block chain
CN113506111A (en) Entity article ownership registration method and device based on block chain

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