Blockchains (smart contracts, distributed ledgers) and rights management broadly construed are the themes of today's Spotlight Applications. Assigned to Coinbase, the fist application discloses techniques for automatic smart contract analysis. Assigned to Qulian Technology (CH), the second application discloses techniques for smart contract client program generation.
20220179626, "Automatic smart contract analysis," assigned to Coinbase, Inc.
Abstract
One or more aspects described herein provide automatic smart contract feature analysis and risk assessment based on unique source code signatures and/or fingerprints within the smart contract. A risk assessment engine may automatically analyze a smart contract by first retrieving smart contract source code from a contract address on a blockchain where the smart contract is accessible. The risk assessment engine may generate an abstract syntax tree (AST) of the smart contract using a compiler for the smart contract source code, and then flatten the AST by removing non-differentiating elements from the AST. The flattened AST may be divided by function calls within the smart contract, and then each division may be fingerprinted, e.g., hashed using a one-way hash. The fingerprint is compared to a database of known functions to automatically identify one or more features of the smart contract with associated risk levels.
20220179651, "Smart contract client program generation method, system and device, and medium," assigned to Hangzhou Qulian Technology Co., Ltd. (CN)
Abstract
A smart contract client program generation method, system and device, and a medium are provided. The method includes: analyzing an interface of a smart contract according to an ABI or a source code of the smart contract; generating, according to an interface analysis result, entity classes corresponding to an incoming parameter and a return parameter of the interface of the smart contract; generating, according to the interface analysis result, a calling method corresponding to the interface of the smart contract; and generating, according to a matched calling layer framework design mode, the entity classes and the calling method, a calling layer program of a smart contract client.