US 11,657,391 B1
System and method for invoking smart contracts
Aaron Blankstein, Chicago, IL (US); and Jude Nelson, New Brunswick, NJ (US)
Assigned to Hiro Systems PBC, New York, NY (US)
Filed by Hiro Systems PBC, New York, NY (US)
Filed on May 24, 2019, as Appl. No. 16/422,432.
Int. Cl. G06F 16/182 (2019.01); G06Q 20/38 (2012.01); G06Q 20/36 (2012.01); H04L 9/06 (2006.01); G06Q 20/40 (2012.01); G06F 9/455 (2018.01)
CPC G06Q 20/3829 (2013.01) [G06F 9/45533 (2013.01); G06F 16/182 (2019.01); G06Q 20/3672 (2013.01); G06Q 20/405 (2013.01); H04L 9/0637 (2013.01)] 11 Claims
OG exemplary drawing
 
1. A computing device of a decentralized network comprising:
a network interface configured to couple the computing device to the decentralized network and to receive a plurality of smart contract source codes and a plurality of transactions therefrom, wherein:
a first transaction of the plurality of transactions is signed by a public key that identifies a principal that created the first transaction,
a second transaction of the plurality of transactions is signed by the public key,
a first smart contract source code of the plurality of smart contract source codes defines a data map schema comprising a map name, a key, and a value, and
the first smart contract source code comprising an initialization function and a second function, wherein the initialization function references a global variable that has an identifier value that corresponds with a public key associated with an entity that signs a transaction that calls the initialization function, and wherein the second function references the global variable that has an identifier value that corresponds with a public key associated with an entity that signs a transaction that calls the second function;
a data store;
a hardware processor; and
a non-transitory computer readable storage medium storing program instructions for execution by the hardware processor in order to cause the computing device to:
call an application program interface to launch a virtual machine,
execute the first smart contract source code using the virtual machine,
with the virtual machine, call the initialization function without passing an identifier value of the global variable that corresponds with the public key that identifies the principal as an argument to the initialization function, wherein the initialization function, based on the first transaction being signed by the public key that identifies the principal, uses the identifier value of the global variable that corresponds with the public key that identifies the principal to insert a data map into the data store as defined by the data map schema, the inserted data map comprising the map name defined in the first smart contract source code, the identifier value of the global variable that corresponds with the public key that identifies the principal for the key, and a second value from the first transaction for the value,
wherein, after initialization, the data store comprises exactly one data map associated with the combination of the map name and the identifier value of the global variable that corresponds with the public key that identifies the principal, and
with the virtual machine, call the second function without passing the identifier value of the global variable that corresponds with the public key that identifies the principal as an argument to the second function, wherein the second function, based on the second transaction being signed by the public key that identifies the principal, uses the identifier value of the global variable that corresponds with the public key that identifies the principal to retrieve the data map from the data store and updates the data map in the data store, the updated data map comprising the map name, the identifier value of the global variable that corresponds with the public key that identifies the principal for the key, and a third value from the second transaction for the value.