# US 2020/0287706 A1 · Software interface for smart contracts

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0287706 A1
- Document ID: US20200287706A1
- Status: Published application
- Kind: A1
- Application number: 16/587,371
- Filed: 2019-09-30
- Published: 2020-09-10
- Earliest claimed: 2019-03-04
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Yanpeng Li
- Web page: https://patentgrep.com/patent/US20200287706A1

## CPC

- H04L 9/0637: {Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]}
- G06F 9/44526: {Plug-ins; Add-ons}
- G06F 9/541: {via adapters, e.g. between incompatible applications}
- G06Q 10/00: Administration; Management
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 9/3297: {involving time stamps, e.g. generation of time stamps}
- G06Q 40/00: Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q 2220/00: Business processing using cryptography
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

Implementations of this specification include retrieving smart contract definitions from the blockchain network, the smart contract definitions including a plurality of contract functions from a plurality of smart contracts stored in a blockchain maintained by the blockchain network; generating a smart contract interface representing the smart contract definitions, the smart contract interface including a plurality of interface functions corresponding to the plurality of contract functions, the smart contract interface allowing software applications to call each of the contract functions by calling a corresponding interface function; receiving a call to a particular interface function from a software application, the call including call parameters; generating a smart contract call to the particular contract function including the call parameters; and transmitting the smart contract call to the blockchain network.

## Claims

### Claim 1

A computer-implemented method for implementing a smart contract call on a blockchain network, the method comprising:
retrieving one or more smart contract definitions from the blockchain network, the one or more smart contract definitions including a plurality of contract functions from a plurality of smart contracts stored in a blockchain maintained by the blockchain network;
generating a smart contract interface representing the one or more smart contract definitions, the smart contract interface including a plurality of interface functions corresponding to the plurality of contract functions, the smart contract interface configured to allow developer software applications to call each of the contract functions by calling a corresponding interface function;
receiving a local call to a particular interface function from a developer software application, the local call including call parameters corresponding to parameters of a particular contract function corresponding to the particular interface function;
in response to the receiving the local call to the particular interface function, (i) retrieving, from the local call, the call parameters, (ii) converting, using a software library, the call parameters to smart contract parameters for communicating with the corresponding smart contract on the blockchain network, and (iii) generating a smart contract call to the particular contract function, the smart contract call including the smart contract parameters; and
transmitting the smart contract call to the blockchain network.

### Claim 2 (depends on 1)

The method of claim 1, further comprising receiving results from an execution of the smart contract call by the blockchain network and providing the results to the developer software application.

### Claim 3 (depends on 1)

The method of claim 1, wherein retrieving the one or more smart contract definitions includes retrieving bytecode associated with smart contracts stored in the blockchain.

### Claim 4

(canceled)

### Claim 5 (depends on 1)

The method of claim 1, wherein each call parameter has a parameter type matching a contract parameter type of a corresponding smart contract parameter of the particular contract function.

### Claim 6 (depends on 5)

The method of claim 5, wherein the parameter type includes at least of an integer, a string, or a byte array.

### Claim 7 (depends on 1)

The method of claim 1, wherein transmitting the smart contract call to the blockchain network comprises broadcasting the smart contract call to a plurality of nodes of the blockchain network.

### Claim 8 (depends on 1)

The method of claim 1, wherein retrieving the one or more smart contract definitions and generating the smart contract interface are performed automatically in response to a change to the one or more smart contract definitions stored in the blockchain.

### Claim 9

A non-transitory, computer-readable storage medium storing one or more instructions executable by a computer system to perform operations comprising:
retrieving one or more smart contract definitions from the blockchain network, the one or more smart contract definitions including a plurality of contract functions from a plurality of smart contracts stored in a blockchain maintained by a blockchain network;
generating a smart contract interface representing the one or more smart contract definitions, the smart contract interface including a plurality of interface functions corresponding to the plurality of contract functions, the smart contract interface configured to allow developer software applications to call each of the contract functions by calling a corresponding interface function;
receiving a local call to a particular interface function from a developer software application, the local call including call parameters corresponding to parameters of a particular contract function corresponding to the particular interface function;
in response to the receiving the local call to the particular interface function, (i) retrieving, from the local call, the call parameters, (ii) converting, using a software library, the call parameters to smart contract parameters for communicating with the corresponding smart contract on the blockchain network, and (iii) generating a smart contract call to the particular contract function, the smart contract call including the smart contract parameters; and
transmitting the smart contract call to the blockchain network.

### Claim 10 (depends on 9)

The non-transitory, computer-readable storage medium of claim 9, the operations further comprising receiving results from an execution of the smart contract call by the blockchain network and providing the results to the developer software application.

### Claim 11 (depends on 9)

The non-transitory, computer-readable storage medium of claim 9, wherein retrieving the one or more smart contract definitions includes retrieving bytecode associated with smart contracts stored in the blockchain.

### Claim 12

(canceled)

### Claim 13 (depends on 9)

The non-transitory, computer-readable storage medium of claim 9, wherein each call parameter has a parameter type matching a contract parameter type of a corresponding smart contract parameter of the particular contract function.

### Claim 14 (depends on 13)

The non-transitory, computer-readable storage medium of claim 13, wherein the parameter type includes at least of an integer, a string, or a byte array.

### Claim 15 (depends on 9)

The non-transitory, computer-readable storage medium of claim 9, wherein transmitting the smart contract call to the blockchain network comprises broadcasting the smart contract call to a plurality of nodes of the blockchain network.

### Claim 16 (depends on 9)

The non-transitory, computer-readable storage medium of claim 9, wherein retrieving the one or more smart contract definitions and generating the smart contract interface are performed automatically in response to a change to the one or more smart contract definitions stored in the blockchain.

### Claim 17

A computer-implemented system, comprising:
one or more computers; and
one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
retrieving one or more smart contract definitions from the blockchain network, the one or more smart contract definitions including a plurality of contract functions from a plurality of smart contracts stored in a blockchain maintained by a blockchain network,
generating a smart contract interface representing the one or more smart contract definitions, the smart contract interface including a plurality of interface functions corresponding to the plurality of contract functions, the smart contract interface configured to allow developer software applications to call each of the contract functions by calling a corresponding interface function,
receiving a local call to a particular interface function from a developer software application, the local call including call parameters corresponding to parameters of a particular contract function corresponding to the particular interface function,
in response to the receiving the local call to the particular interface function, (i) retrieving, from the local call, the call parameters, (ii) converting, using a software library, the call parameters to smart contract parameters for communicating with the corresponding smart contract on the blockchain network, and (iii) generating a smart contract call to the particular contract function, the smart contract call including the smart contract parameters, and
transmitting the smart contract call to the blockchain network.

### Claim 18 (depends on 17)

The system of claim 17, wherein the operations further comprise receiving results from an execution of the smart contract call by the blockchain network and providing the results to the developer software application.

### Claim 19 (depends on 17)

The system of claim 17, wherein retrieving the one or more smart contract definitions includes retrieving bytecode associated with smart contracts stored in the blockchain.

### Claim 20

(canceled)

### Claim 21 (depends on 17)

The system of claim 17, wherein each call parameter has a parameter type matching a contract parameter type of a corresponding smart contract parameter of the particular contract function.

### Claim 22 (depends on 17)

The system of claim 17, wherein the parameter type includes at least of an integer, a string, or a byte array.

### Claim 23 (depends on 17)

The system of claim 17, wherein transmitting the smart contract call to the blockchain network comprises broadcasting the smart contract call to a plurality of nodes of the blockchain network.

### Claim 24 (depends on 17)

The system of claim 17, wherein retrieving the one or more smart contract definitions and generating the smart contract interface are performed automatically in response to a change to the one or more smart contract definitions stored in the blockchain.

### Claim 25 (depends on 1)

The method of claim 1, wherein converting the call parameters to smart contract parameters comprises at least one of:
converting a string value or a character value to corresponding numerical values, or
generating a second number of the smart contract parameters from a first number of the call parameters, wherein the second number is larger than the first number.

### Claim 26 (depends on 1)

The method of claim 1, further comprising:
performing an error check on the execution of the software application prior to transmitting the contract call to the blockchain network.
